Monday, April 30, 2012

JAVA Font Dialog Program source code using AWT and Frames | Mini Project

Following JAVA snippet (for font dialog box/drop down list) doesn't do any thing special. It just displays list of all available fonts in system as items added to Choice component. This allows user interface through which different fonts can be selected. You can use this code as a module in you java mini project in case you are developing a text editor or anything related to that.


 import java.awt.*;  
 import java.awt.event.*;  
 public class FontDialog extends Frame{  
   Choice c;  
   public FontDialog(){  
     super("Font Dialog | A.T.");  
     addWindowListener(new WindowHandlerNew());  
     setLayout(new BorderLayout(50,50));  
     setSize(800,500);  
     setFont(new Font("Times New Roman",Font.BOLD,24));  
     c=new Choice();  
     String FontList[];  
     GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();  
     FontList = ge.getAvailableFontFamilyNames();  
     for(int i = 0; i < FontList.length; i++)  
       c.addItem(FontList[i]);  
     c.setFont(new Font("Times New Roman",Font.PLAIN,16));  
     c.addItemListener(new FontChanger(this));  
     add(c,BorderLayout.NORTH);  
     setVisible(true);  
   }  
   public void paint(Graphics g){  
     g.drawString("Hello Word !!!", 300, 400);  
   }  
  public static void main(String args[]){  
    FontDialog f=new FontDialog();  
  }  
 }  
 class WindowHandlerNew implements WindowListener{  
   public void windowDeactivated(WindowEvent e){  
   }  
   public void windowActivated(WindowEvent e){  
   }  
   public void windowDeiconified(WindowEvent e){  
   }  
   public void windowIconified(WindowEvent e){  
   }  
   public void windowClosing(WindowEvent e){  
     System.exit(0);  
   }  
   public void windowClosed(WindowEvent e){  
   }  
   public void windowOpened(WindowEvent e){  
   }  
 }  
 class FontChanger implements ItemListener{  
   FontDialog f;  
   public FontChanger(FontDialog f){  
     this.f=f;  
   }  
   public void itemStateChanged(ItemEvent e){  
     String fn=f.c.getSelectedItem();  
     Font font=new Font(fn,Font.BOLD,24);  
     f.setFont(font);  
     f.repaint();  
   }  
 }  

Friday, April 27, 2012

C interview basic questions and answers for freshers

Latest collection of interview questions on C for freshers. Find output type c interview question involving string concept.


What is Output of following c snippet?
int main(){
   char *s="Abhas";
   printf("%s",s+ 2); 
   getch();
}
Answer:
has
Explanation: In the above program role of %s is to display the string whose address is passed as an argument. This is how a standard printf statement works in c language. Now since we have passed s + 2 as an argument therefore first value of this expression is evaluated. Here ‘s’ would refer to address of first character in string ‘s’. Now printf would get address of third character (address of first character + 2) as argument so it will display the string starting from third position.  Hence output would be ‘has’.

50 C Interview Questions Answers
Logical C Interview Questions Answers

Find more objective c interview questions answers. Download latest pdf on c interview questions and answers, Test your c skills. 

Free download c interview programs as pdf

Simple C Interview questions and definitions

Read more related posts below.


C interview test Questions and Answer in DOC

Test type subjective logical C interview questions answers




Give two use of bitwise and (&) operator?

It can be used to check whether particular bit is set or not. Eg suppose we have a number 101. Now if we want to check whether its second bit is on or off. To know this we must simply do bitwise and operation on this number with 010. Since result is 0 therefore we can acknowledge that second bit is low in our case.

It can be used to unset particular bit. Eg if you want to unset second LSB of any number then you must simply do bitwise operation between that number and …11111101.




You can see the related posts for more c interview questions answers.

Also you can find some questions mentioned in this website in doc and pdf format uploaded at mediafire.com in one of these related blog post.

C interview interesting questions | C interview Questions Answers


Interesting C interview question inspired from GATE exam.

What is Output of following c snippet?
int main(){
   char *s="Abhas";
   printf("%s",s+s[1]-s[3]); 
   getch();
}

Answer:
bhas

Reason/Solution: In the above program role of %s is to display the string whose address is passed as an argument. This is how a standard printf statement works in c language. Now since we have passed s- s[1]+ s[3] as an argument therefore first value of this expression is evaluated. Here ‘s’ would refer to address of first character in string ‘s’. Since we are subtracting s[1] from s[3] characters at corresponding position (that are ‘a’ and ‘b’) would be subtracted.  On subtracting ‘a’ from ‘b’ (ASCII Value) we get 1 which is added to address of first character in ‘s’ (also referred as ‘s’). Now printf would get address of second character (address of first character + 1) as argument so it will display the string starting from second position.  Hence output is bhas.


Click here to checkout more subjective C Interview question answers


You can see the related posts for more c interview questions answers.

Thursday, April 26, 2012

9 Mini projects in C Language for B.Tech. CS IT with Source code download

C Project Flipkart

  1. Chess game coding in C
  2. Railway Reservation System Program in C for mini project
  3. MiniProject in C Hotel Reservation and management System
  4. Mini Project in C language for DOS Key Logger 
  5. Library Management System (Mini Project in C)
  6. C Program for Bricks Game mini project.
  7. Mini Project in C programming for A Car racing game 
  8. Folder Protection Software in C 
  9. Employee Database Project Using C
All these mini projects are available at C Magical Please do not directly copy and submit the source code as mini project. Use your own creativity and modify the code. Take idea from the projects given here and make something new. Remember aim of engineering is creation of new things. 

Ready to spend some money for mini project. Mail your requirements at 2kwebdevteam [a t] g m a i l.com  and get your mini project for as less as INR 500

All the best for your mini project.

Also you can check out
List of new Project and mini project ideas and topics

First Fit program in C language | Memory Management | Operating System

Source code for First Fit Algorithm in C 


int main(){
   
   int p,m;  
   printf("Enter number of processes:");
   scanf("%d",&p);
   printf("Enter number of Memory blocks:");
   scanf("%d",&m);
   
   int parr[p],marr[m],i;
   for(i=0;i<p;i++)
   {
     printf("Enter size of process %d:",i+1);
     scanf("%d",&parr[i]);      
   }
   for(i=0;i<m;i++)
   {
     printf("Enter size of memory %d:",i+1);
     scanf("%d",&marr[i]);      
   }
   int j;
   for(i=0;i<p;i++){
       for(j=0;j<m;j++){
         if(marr[j]>=parr[i]){
              marr[j]-=parr[i];
              printf("Allocating process %d to memory %d\n Size remaining in it after allocation %d\n\n",i+1,j+1,marr[j]);   
              break;            
         }  
         
        
     }    
      if(j==m)
         {printf("Not enough memory for process %d",i);break;}        
   }
  getch();  
}

C Program to implement Worst fit memory management Algorithm

Worst Fit Memory management Algorithm Source code in C Language



int main(){
   
   int p,m;  
   printf("Enter number of processes:");
   scanf("%d",&p);
   printf("Enter number of Memory blocks:");
   scanf("%d",&m);
   
   int parr[p];
   struct mem{
          int id;
          int size;
   }marr[m];
   int i;
   for(i=0;i<p;i++)
   {
     printf("Enter size of process %d:",i+1);
     scanf("%d",&parr[i]);      
   }
   for(i=0;i<m;i++)
   {
     printf("Enter size of memory %d:",i+1);
     scanf("%d",&marr[i].size);   
     marr[i].id=i+1;   
   }
   int j;
   for(i=0;i<m;i++)
   for(j=i+1;j<m;j++)
   if(marr[i].size<marr[j].size)
   {
    struct mem t=marr[i];
    marr[i]=marr[j];
    marr[j]=t;                               
   }
   for(i=0;i<p;i++){
       for(j=0;j<m;j++){
         if(marr[j].size>=parr[i]){
              marr[j].size-=parr[i];
              printf("Allocating process %d to memory %d\n Size remaining in it after allocation %d\n\n",i+1,j+1,marr[j].size);   
              break;              
         }  
         
        
     }    
      if(j==m)
         {printf("Not enough memory for process %d",i);break;}        
   }
  getch();  
}

Wednesday, April 25, 2012

Best Fit Source code in C | Memory management Algorithm | Operation System

C Program to implement Best Fit Memory management algorithm


int main(){
   
   int p,m;  
   printf("Enter number of processes:");
   scanf("%d",&p);
   printf("Enter number of Memory blocks:");
   scanf("%d",&m);
   
   int parr[p];
   struct mem{
          int id;
          int size;
   }marr[m];
   int i;
   for(i=0;i<p;i++)
   {
     printf("Enter size of process %d:",i+1);
     scanf("%d",&parr[i]);      
   }
   for(i=0;i<m;i++)
   {
     printf("Enter size of memory %d:",i+1);
     scanf("%d",&marr[i].size);   
     marr[i].id=i+1;   
   }
   int j;
   for(i=0;i<m;i++)
   for(j=i+1;j<m;j++)
   if(marr[i].size>marr[j].size)
   {
    struct mem t=marr[i];
    marr[i]=marr[j];
    marr[j]=t;                               
   }
   for(i=0;i<p;i++){
       for(j=0;j<m;j++){
         if(marr[j].size>=parr[i]){
              marr[j].size-=parr[i];
              printf("Allocating process %d to memory %d\n Size remaining in it after allocation %d\n\n",i+1,j+1,marr[j].size);   
              break;            
         }  
         
        
     }    
      if(j==m)
         {printf("Not enough memory for process %d",i);break;}        
   }
  getch();  
}

Next fit Program in C Language Memory management Algorithm

Next fit Program in C Language Memory management Algorithm Operating System programs in C language

int main(){
   
   int p,m;  
   printf("Enter number of processes:");
   scanf("%d",&p);
   printf("Enter number of Memory blocks:");
   scanf("%d",&m);
   
   int parr[p],marr[m],i;
   for(i=0;i<p;i++)
   {
     printf("Enter size of process %d:",i+1);
     scanf("%d",&parr[i]);      
   }
   for(i=0;i<m;i++)
   {
     printf("Enter size of memory %d:",i+1);
     scanf("%d",&marr[i]);      
   }
   int j=0;
   for(i=0;i<p;i++){
      printf("search %d %d",i,j);
       for(;;j=(j+1)%m){
         if(marr[j]>=parr[i]){
              marr[j]-=parr[i];
              printf("Allocating process %d to memory %d\n Size remaining in it after allocation %d\n\n",i+1,j+1,marr[j]);   
              printf("%d %d\n\n",j,(j+1)%m);
              
              break;            
         }  
         
        
     }    
      if(j==m)
         {printf("Not enough memory for process %d",i);break;}        
   }
  getch();  
}

Saturday, April 21, 2012

VITEEE 2012 Solutions | VITEEE Cutoff 2012

VITEEE 2012 Solutions

VITEEE 2012 examination is being conducted on 21st April 2012VITEEE 2012 results are expected to be declared in beginning of May. VITEEE 2012 Solutions and VITEEE Cutoff marks related information can be found in previous blog post :

VITEEE 2012 VIT Vellore Solutions answer key rank cutoff marks 

VITEEE 2012 rank predictions will be posted soon in blog. You can press ctrl+d to bookmark this page. Also if you want you can +1 this page so that next time you can find this page quickly.

Please note that VIT has announced expected dates for counselling in advance. This has been done by VIT for aspirants in North India. Railway ticket from those cities get booked withing few hours of opening. It is advised that students book their railway tickets in advance.

All the best to aspirants giving VITEEE 2012.

VITEEE 2012 VIT Vellore Solutions

Friday, April 20, 2012

VITEEE Solutions 2012 | VITEEE Answer Key 2012

VITEEE Solutions 2012


VITEEE 2012 VIT Vellore Solutions answer key rank cutoff marks pdf download FREE


VIT, University is one of the most popular private engineering colleges in India. Vellore Institute of technology popularly known as VIT conducted its VITEEE 2012 examination on 21st April 2012. Last year more than 1.5 lakh students appeared in VITEEE exam. VIT University is more than 25 years old academic organization. Official website of college is http://vit.ac.in . VITEEE 2012 results are expected to be declared in beginning of May. College has already displayed dates of counseling so as to allow aspirants book their tickets in advance.

Read more at >>







Wednesday, April 18, 2012

C language Interview Questions Answers on basics of C



In this post you can find some very basic C language interview questions. The questions answers in this post are concise and very basic. You can find more detailed and complex c interview questions answers and pdf at

Q) What standard of C language was popular before ANCI C?
A) K&R standard

Q) Who were the two main individuals involved in development of K&R standard for C language?
A) Brian Kernighan and Dennis Ritchie

Q) Is C a compiled language or interpreted language?
A) Compiled language

Q) Why C Programming Language Has Been Named as C?
A) Because it is based on another language called B

Q) What are applications of C programming language?
A) C language is considered ideal language for learning basics of programming to students. Many educational boards have C language as first language taught to computer science students. C language is used for creating computer applications and also used a lot in writing embedded software/firmware for products which use micro-controllers.

You can find more C interview questions and answers in related posts shown below.

Tuesday, April 17, 2012

Best C interview questions and answers PDF download

C Interview Questions with solution 
In this blog you can find lot of good questions for technical c job interviews. I have written several posts on the topic and will keep doing that. You can download a pdf for series of subjective questions at


C Interview Questions Answers PDF

All these questions are available as PDF at:
http://www.mediafire.com/?i5ghxw4mhetp6s1

Click here for common c interview questions asked in companies like Accenture, TCS, CTS, Wipro & Infosys



You can  find more related posts below.


Teamviewer free download for windows 7 | Team Viewer

Team viewer software allows sharing of data between remote locations. Using this software you can control a remote PC as if you are actually sing that system. You can visit official download site at http://www.teamviewer.com/en/download/currentversion.aspx

Saturday, April 14, 2012

C Program to calculate and display sum of two matrix

 #include<stdio.h>  
 #include<conio.h>  
 void main()  
 {  
 int a[3][3],b[3][3],c[3][3],i,j;  
 clrscr();  
 printf("Enter the elements into first matrix \n");  
 for(i=0;i<3;i++)  
      for(j=0;j<3;j++)  
      scanf("%d",&a[i][j]);  
      printf("\nEnter the elements into second matrix\n");  
      for(i=0;i<3;i++)  
           for(j=0;j<3;j++)  
           scanf("%d",&b[i][j]);  
      for(i=0;i<3;i++)  
           for(j=0;j<3;j++)  
           c[i][j]=a[i][j]+b[i][j];  
      for(i=0;i<3;i++)  
           {  
           printf("\t\t");  
           for(j=0;j<3;j++)  
           printf("%d\t",c[i][j]);  
           printf("\n\a");  
           }  
 getch();  
 }  

C language program to add numbers using pointers

 #include<stdio.h>  
 #include<conio.h>  
  void main()  
  {  
  int a[10],sum=0;  
  int *j;  
  int i,n;  
  clrscr();  
  printf("How many elements you want to add:");  
  scanf("%d",&n);  
  printf("Enter element:");  
  for(i=0;i<n;i++)  
  {  
  scanf("%d",&a[i]);  
  }  
  j=&a[0];  
  for(i=0;i<n;i++)  
    {  
     sum=sum+*j;  
     j++;  
    }  
  printf("sum=%d",sum);  
 }  

C Program to show use of command line arguments

 #include<stdio.h>  
 #include<conio.h>  
 #include<stdlib.h>  
 void main(int argc,char *argv[])  
 {  
 int sum=0,i;  
 //if wrong number of command line arguments
 if(argc<3)  
 {  
 printf("Incorrect number of arguments:\n");  
 getch();  
 return 0;  
 }  
 //Add all the numbers entered using atoi function  
 for(i=1;i<argc;i++)  
 {  
 sum+=atoi(argv[i]);  //string to number
 }  
 //print the sum  
 printf("Ans=%d",sum);  
 getch();  
 }  

Simple C Program to show use of Comparison Operators in c language

 int main()  
 {  
 int number1 , number2;  
 printf("Enter the number1 number to compare.\n");  
 scanf("%d",&number1);  
 printf("Enter the number2 number to compare.\n");  
 scanf("%d",&number2);  
 printf("number1 > number2 has the value %d\n", number1 > number2);  
 printf("number1 < number2 has the value %d\n", number1 < number2);  
 printf("number1 == number2 has the value %d\n", number1 == number2);  
 return 0;  
 }  

Simple Bubble sort function in C Language Program

 void bubblesort(int array[],int size)  
 {  
 int tmp ,i,j;  
 for(i = 0;i  
 for(j=0;j < size;j++)  
 if(array[i] < array[j])  
 {  
 tmp = array[i];  
 array[i] = array[j];  
 array[j] = tmp;  
 }  
 }  

What is fork() in C language?


As we know, our running program is a process. From this process we can create another process. There is a parent-child relationship between the two processes. The way to achieve this is by using a library function called fork( ). This function splits the running process into two processes, the existing one is known as parent and the new process is known as child. Here is a program that demonstrates this…

# include <sys/types.h>
int main( )
{
printf ( "Before Forking\n" ) ;
fork( ) ;
printf ( "After Forking\n" ) ;
}
Here is the output of the program…
Before Forking
After Forking
After Forking

As we know, fork( ) creates a child process and duplicates the code of the parent process in the child process. There onwards the execution of the fork( ) function continues in both the processes. Thus the duplication code inside fork( ) is executed once, whereas the remaining code inside it is executed in both the parent as well as the child process. Hence control would come back from fork( ) twice, even though it is actually called only once. When control returns from fork( ) of the parent process it returns the PID of the child process, whereas when control returns from fork( ) of the child process it always returns a 0. This can be exploited by our program to segregate the code that we want to execute in the parent process from the code that we want to execute in the child process. We have done this in our program using an if statement. In the parent process the ‘else block’ would get executed, whereas in the child process the ‘if block’ would get executed.


# include <sys/types.h>
int main( )
{
int pid ;
pid = fork( ) ;
if ( pid == 0 )
{
printf ( "Child : Hello I am the child process\n" ) ;
printf ( "Child : Child’s PID: %d\n", getpid( ) ) ;
printf ( "Child : Parent’s PID: %d\n”, getppid( ) ) ;
}
else
{
printf ( "Parent : Hello I am the parent process\n" ) ;
printf ( "Parent : Parent’s PID: %d\n”, getpid( ) ) ;
printf ( "Parent : Child’s PID: %d\n", pid ) ;
}
}

What is C language Program and data type?


C language program


C program is instruction given to computer in c language to perform particular task. As a building is made of bricks, a C program is made of basic elements, such as expressions, statements, statement blocks, and function blocks.

C language data type

Data types are means to identify what type of data is being stored in variable.
The primary data types could be of three varieties—char, int, and float. It may seem odd to many, how C programmers manage with such a tiny set of data types. C programmers can derive many data types from these three types. A C programmer can always invent whatever data type he needs.
Not only this, the primary data types themselves could be of several types. For example, a char could be an unsigned char or a signed char. Or an int could be a short int or a long int

Basics of C programming language and notes


What is C language basic syntax?


This is basic hello world program in c language. You can use turbo c++ or dev c++ to compile and run the c language program.
 #include <stdlib.h>
 #include <stdio.h>

 int main()
 {
 printf ("Hello World \n");
 getch();
 }

C Language is Compiled Language and not Interpreted Language.


There are two types of programming languages: compiled language and interpreted language. A compiler is needed to translate a program written in a compiled language into machine understandable code (that is, binary code) before you can run the program on your machine. When the translation is done, the binary code can be saved into an application file. You can keep running the application file without the compiler unless the program (source code) is updated and you have to recompile it. The binary code or application file is also called executable code (or an executable file).

On the other hand, a program written in an interpreted language can be run immediately after you finish writing it. But such a program always needs an interpreter to translate the high-level instructions into machine-understandable instructions (binary code) at runtime. You cannot run the program on a machine unless the right interpreter is available. You can think of the C language as a compiled language because most C language vendors make only C compilers to support programs written in C.

What is C Language’s history?


The C language was developed by Dennis Ritchie in 1972 at AT&T Bell Labs.

For many years, the de facto standard for the C programming language was the K&R standard because of the book The C Programming Language, written by Brian Kernighan and Dennis Ritchie in 1978. However, there were many changes unofficially made to the C language that were not presented in the K&R standard.

Fearing that C might lose its portability, a group of compiler vendors and software developers petitioned the American National Standards Institute (ANSI) to build a standard for the C language in 1983. ANSI approved the application and formed the X3J11 Technical Committee to work on the C standard. By the end of 1989, the committee approved the ANSI standard for the C programming language.

The ANSI standard for C enhances the K&R standard and defines a group of commonly used C functions that are expected to be found in the ANSI C standard library. Now, all C compilers have the standard library, along with some other compiler-specific functions.

What is C Language programming ? C Language notes in pdf ppt doc


What is C Language?

C is a programming language. The C language was developed by Dennis Ritchie in 1972 at AT&T Bell Labs. It was called his newly developed language C simply because there was a B programming language already and the B language led to the development of C Language. C language is based on ALGOL and B languages.

As said above C language is a programming language. Programming language is any language that computer system can understand directly or indirectly to can perform the actions asked by the programmer as set of instructions in form of a computer program.

C language is a high-level programming language. In the computer world, the further a programming language is from the computer architecture, the higher the language's level. You can imagine that the lowest-level languages are machine languages that computers understand directly. The high-level programming languages, on the other hand, are closer to our human languages.

A computer program written in a high-level language, such as C, Java, or Perl, is just a text file, consisting of English-like characters and words. We have to use some special programs, called compilers or interpreters, to translate such a program into a machine-readable code. That is, the text format of all instructions written in a high-level language has to be converted into the binary format. The code obtained after the translation is called binary code. Prior to the translation, a program in text format is called source code. The smallest unit of the binary code is called a bit (from binary digit), which can have a value of 0 or 1. 8 bits make up one byte, and half a byte (4 bits) is one nibble.

  • ·         C is a general-purpose programming language.
  • ·         C is a high-level language that has the advantages of readability, maintainability, and portability.
  • ·          C is a very efficient language that allows you to get control of computer hardware and peripherals.
  • ·          C is a small language that you can learn easily in a relatively short time.
  • ·         Programs written in C can be reused.
  • ·          Programs written in C must be compiled and translated into machine-readable code before the computer can execute them.

What is C language in simple words?

C is a general-purpose programming language. It's a high-level language that has advantages such as readability, maintainability, and portability. Also, C allows you to get down to the hardware to increase the performance speed if needed. A C compiler is needed to translate programs written in C language into machine-understandable code. The portability of C is realized by recompiling the C programs with different C compilers specified for different types of computers.


You can browse this blog for good C Language notes.

Friday, April 13, 2012

c program for pascal triangle with and without arrays using for loops

Pascal triangle in c without using array  C code to print Pascal triangle  Simple c program for Pascal triangle  C program to generate Pascal triangle Pascal triangle program in c language  C program to print Pascal triangle using for loop


http://cquestionbank.blogspot.in/2010/06/write-c-program-to-print-pascal.html



c program to print pascal triangle [using arrays and for loop]


c program for prime number between 1 to n


I have assumed N to be hundred. You can use scanf to input N and display prime number between 1 to n.


Prime Numbers are numbers which are only divisible by two numbers. eg 2,3,5,7,11 etc.


c program for prime number


int main()
{
int i,j,n=0;
for(i=2;i<=100;i++)
{
for(j=1;j<=i;j++)
{
if(i%j==0)
{
n++;
}
}
if(n==2)
printf("%d\n",i);
n=0;
}
getch();
}

Thursday, April 12, 2012

List of free online journals publication in Computer Science and Information Technology

Usually scholars find it difficult to hunt for some good online  journals to publish their research work. You must take impact factor of journal into consideration before making decision of choosing some particular journal. There days lot of research papers are coming from engineering young minds. Undergraduate students usually look for free online journals for publishing their work. In this post I am providing list of  free online journals publication in Computer Science and Information Technology :

Journals publication in Computer Science and Information Technology










Please don't forget to note Impact factor of these journal.

What is Impact factor ?


The impact factor, often abbreviated IF, is a measure reflecting the average number of citations to recent articles published in science and social science journals.
http://en.wikipedia.org/wiki/Impact_factor

Tuesday, April 10, 2012

Technical interview questions and answers for freshers | C JAVA free download


Technical interview questions and answers for freshers | C JAVA CTS TCS Wipro Cognizant | free download

Number of technical professionals has seen a rapid increase in India. India is slowly becoming software hub of planet. Both number of job and technical professionals have increased in number in recent years. There is demand for websites and blog that provide valuable material for preparing technical interviews.

Some good websites that are store house of valuable technical interview questions are listed below:

TCS Wipro Cognizant technical interview questions


http://www.cwithabhas.com/2013/09/simple-c-interview-questions-for-mass.html

http://placement.freshersworld.com/placement-papers/node/18339

Programming related C Interview questions asked in TCS, Wipro, Cognizant & Accenture

Latest C Interview Questions and answers

Technical interview questions for freshers 

C and JAVA Technical interview questions with answers

Some recommended books for placement preparations :
  • Data Structures and Algorithms Made Easy 
  • Test Your C Skills
  • Any one general aptitude book like Arun Sharma,  RS Agarwal
Important Data Structures topics for placement interviews

  • Linked Lists
  • Stacks
  • Queues
  • Trees
  • Graph
  • Recursion and Backtracking
  • Sorting   
  • Searching   
  • Hashing   
  • String Algorithms
Visit blog home page for more articles on interview preparation.

Saturday, April 7, 2012

Funny IIT JEE AIEEE VITEEE Exam facebook status updates one liners

Crazy YOU !!! you had your exam today... Actually you must be having some very important exam today since you come to this page (title of page has names of some imp exams so it is easy to guess that !!!)... BUT you are thinking of updating your status at facebook..well your wish... Here I have listed some cool status updates that you can use during your exam days.... Note that not all are funny, some are inspirational too. Try add some extra bits to these and make it more personal :



  • Biggest Mystery of Maths, 1000s of years passed, Millions of theorems derived, Millions of formulas made, But still, X is unknown!
  • Exams Are never over
  • I am in a relationship with studies and it’s complicated
  • The brain is the most outstanding organ. It works for 24 hours, 365 days, right from your birth, until you step in the exam hall.
  • Failure is always temporary, only giving up makes it permanent.
  • Keep your face to the sunshine and you can never see the shadow.
  • If you think you can win, you can.
  • Come what come may, Time and hour run through the rougest day.
  • Few minds wear out; most rust out.
  • The journey of a thousand miles starts with a single step.
  • It’s not that I’m so smart, it’s just that I stay with problems longer.
  • The best way to finish an unpleasant task is to get started.
  • You may never know what results come of your action, but if you do nothing there will be no result.
  • If you love what you do, you will never work another day in your life.

IIT JEE 2012 Solutions answer key Download Paper cutoff and rank predictions


IIT JEE 2012 is supposed to be conducted on 8th April, 2012. Number of websites and forums are eagerly waiting for the day to come as they get hell lot of traffic on their online portals on IIT exam day. Students usually look google for following things:

1.       IIT JEE 2012 Solutions
2.       IITJEE 2012 Answer key
3.       IITJEE 2012 Cutoff

In this post I provide some good websites for each of this query where you can easily find what you are looking for

IITJEE 2012 Solution


Aaksh IITJEE is quick in publishing solutions. You can check IIT JEE 2012 Solutions in their official website at www.aakashiitjee.com

FIITJEE IITJEE 2012 solutions can be found at fiitjee.com

IIT JEE 2012 Answer Key

In same websites mentioned above you can find the Solution key to paper as well.

IITJEE 2012 Rank cutoff marks predictions

Number of bloggers make predictions about ranks based on marks but I advise not to trust such blogs. Even predictions of professional coachings like FIITJEE may not be totally correct. It is better that you concentrate on other important exams rather than searching for cutoff and other such information about the paper. However if you want to find your expected rank you can visit fiitjee.com or resonance http://www.resonance.ac.in/

Friday, April 6, 2012

What to do when someone makes a fake facebook profile by your name ?

remove fake facebook profile
Fake social media profiles are one of the emerging problem in the cyber world. With increased popularity of social networking websites like Facebook and twitter problem of fake profiles has also gained trend. Usually victims of fake profiles are college girls or famous personalities. If you are Barack Obama you can easily call your associates who will then get in touch with Mr. Zuckerberg and he will get your named clear again.

But this post will guide you on what to do when someone makes your fake profile and you are not as powerful as Mr Obama. There are three simple methods that you can use in such situation. Use any one of this and you can get rid of your fake profile.

Remove fake account using Facebook Report abuse method

Check this official tutorial by Facebook on what to do if someone is pretending to be you on Facebook 

Ask at least 10-20 friend of yours to report that account in same manner. Try calling some of your friends from different parts of world and ask them to do the same. Use all your human resources. 

If you manage to get good number of people reporting about that account then most probably Facebook will soon ban such account. But just in case you are not comfortable with this method or you badly want to screw the person then check out the next method. It's pretty cool.

Trace his Location. Know who has made your fake profile

In this method I will explain how you can actually find who has made your fake profile. You can trace IP address of the person which can later be used to track his location. This is how you do it: 
  1. Go to http://iptracking.geniushackers.com 
  2. Enter your mail ID. One unique link will be generated.
  3. Now go to http://tinyurl.com/ ad enter that unique url that you got from previous step. In Custom alias box enter something like collegefun2012 or loveyou29 etc. Actually what we are doing is that we are masking that odd looking ugly url into something interesting in which our victim would be interested. It will then give you a url like tinyurl.com/somethingUentered This url will redirect to that secret url.
  4. If any one visits the url generated in step 2 then his details will be send to you at the email address that you provided. So now only job left for you is to make that person open that link. Since you have masked that url with a short cool custom link so same will happen if someone visits the link generated in step 3.
  5. Use social engineering combined with facebook chat and make that person open the link
Once you have IP address of person you can do a lot more than tracking his location. If you are from some college and you find that IP belong to same college then you can take some help from IT geeks of your college. Actually IP addresses in colleges follow some logical order usually and you can easily narrow the location and trace down the person. Just take some help from geeks in your college, they will guide you on what to do after you have his IP with you.

If you really want to screw that person badly and want him behind bars then you can use the method I have suggested below combined with this method.

Report to cyber crime cell

Check out mail addresses of cyber crime department officers at


Just drop a mail to one of them and they will take care of rest. Note that sending mail is analogous to registering FIR and may involve some legal complexities. Use this method when no other alternative is left of if you are really p***ed off by what is happening through that account. 


All the best from my side. Hope this post solved your problem and you will soon get rid of your fake profile

Monday, April 2, 2012

C Interview questions and Answers | NEW Subjective Interview questions pdf


C Interview Questions Answers


Here are few examples of standard subjective oral questions asked in C interviews. Note how the questions are interrelated and how difficulty of questions increases as interview moves on. A mediocre student will perhaps give up after three or four questions and only those who have clear knowledge of concepts related to C language will make till the last question.

I recommend reading online forums, books like c loops and pitfall and experimentation with your code for clear knowledge of C concepts.


What is a data type?
It is means to identify type of data. When we are storing something in our program then we need to allocate some space for that purpose and while allocating that space we must also specify what kind of data is to be stored in the allocated space. Data types help to solve this problem.

Give example of some data types?
Int, char, float, void etc. are all examples of predefined basic primitive data types. Structures and Unions are user defined data types.

Is it possible to bring about conversion from one data type to other?
Yes, most programming languages provide ways for data to be converted from one data type to other. Data conversion can be both implicit and explicit. Implicit type conversion involves automatic type promotion. Explicit type conversion is also called type casting and may lead to loss in data precision.

What are strings and how can they be represented in c language?
Strings are collection of characters written in particular order. In ‘c’ language they can be implemented by either making array of characters or by making pointer to character data type.

Is there any difference between the two representations?
Often pointers and arrays are considered to be same in case of c language however there is a small difference in both. In case of pointers data is accessed indirectly, so you first retrieve the contents of the pointer, load that as an address (call it "L"), then retrieve its contents. If the pointer has a subscript [i] you instead retrieve the contents of the location 'i' units past "L". They are commonly used for dynamic data structures. In case of arrays Data is accessed directly, so for a[i] you simply retrieve the contents of the location i units past a. They are commonly used for holding a fixed number of elements of the same type of data.

Is it possible to convert strings in c/c++ to corresponding Integer?
atoi() is a predefined function whose prototype is declared in header file stdlib.h. It can be used to convert a string into corresponding integer value by passing the string as an argument in function.

What will happen if some illegal request is made to this function?
Function returns 0 if we try to convert any invalid string to integer. Eg. ‘aaa’ can’t be converted to an integer so atoi(‘aaa’); would return 0.

What will happen if any string in c is converted to integer explicitly?
If we try to convert string into integer explicitly then string’s address will get stored in integer.
int main(){
    char *a="abhas";
    int b=(int)a; // now b will hold address of a
}

C Interview Questions Answers PDF

All these questions are available as PDF at: