Select chapter



functions (3.papers)
loops (1.papers)
arrays (2.papers)
structures (3.papers)
unions (1.papers)
pointers (7.papers)
null pointers (1.papers)
strings (2.papers)
misc c concepts (1.papers)
Data structures (5.papers)
linked lists (3.papers)
trees (1.papers)
basics (5.papers)
Hide

Sponsored Links


  

c interview questions and answers

Show Answer
Share Facebook gmail Twitter
2
Who invented c language?
  1. Dennis Ritchie
  2. James Gosling
  3. Bjarne StrouStrup
  4. Bill Gates
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
4
In c, from which function program execution starts?
  1. fun()
  2. main()
  3. both fun() and main()
  4. none are correct
Show Answer
Share Facebook gmail Twitter
5
What is a variable?
  1. Variable is a placeholder to hold a value.
  2. Variable is a method
  3. Variable is a object.
  4. none are correct
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
8
What is the difference between printf and scanf functions in c?
  1. printf is used to display the output and scanf is used to read the data from input devices.
  2. printf is used to take value from input devices, and scanf is used to display output
  3. none
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
10
What does below program do?

int main()
{
 int num, i, flag=0; 
 printf("enter a number");
 scanf("%d",&num);
 for(i=2;i<=num/2;++i) 
 { 
  if(num%i==0) 
   { 
     flag=1; 
     break; 
   } 
 } 
 if (flag==0)  
        printf("true",n); 
 else 
        printf("false",n); 
} 
  1. it will find if num is odd or even
  2. it will find if num is prime number or not
  3. it is finding factorial of num
  4. it is finding fibonacci series for num numbers
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
12
What does below program do?

int main()
{
 int num; 
 printf("enter a number");
 scanf("%d",&num);
 if (num%2==0)  
        printf("TRUE",n); 
 else 
        printf("FALSE",n); 
}
  1. It will find if num is odd or even
  2. It will find if num is prime number or not
  3. It is finding factorial of num
  4. It is finding fibonacci series for num numbers
Show Answer
Share Facebook gmail Twitter
13
What does below program do?

int main(void)
{
    int f=1,i=1,n;
    printf("Enter a number");
    scanf("%d",&n)
    while(i<=n)
    {
        f=f * i;
        i=i+1;
    }
    printf("%d",f);
}
  1. It will find if num is odd or even
  2. It will find if num is prime number or not
  3. It is finding factorial of num
  4. It is finding fibonacci series for num numbers
Show Answer
Share Facebook gmail Twitter
14
What is an array in c?
  1. It is a homogeneous data structure which can hold data of same type
  2. It is a homogeneous data structure which can hold data of different type
  3. It is a heterogeneous data structure which can hold data of same type
  4. none
Show Answer
Share Facebook gmail Twitter
15
What is a structure in c?
  1. It is a user defined data type which can hold the data of heterogeneous type
  2. It is a homogeneous data structure which can hold data of same type
  3. It is a homogeneous data structure which can hold data of different type
  4. none
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
17
What is the difference between structure and union in c?
  1. In structure, memory is allocated for all variables. Where as in union memory is allocated for only one variable which requires more memory. (i.e for higher data type variable).
  2. Structure and union both allocates memory for all variables
  3. Both are correct
  4. none are correct
Show Answer
Share Facebook gmail Twitter
18
What is a pointer in c?
  1. pointer is a variable which holds the address of anything.
  2. There are no pointers in c
  3. Pointer means a constants
  4. none
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
Read more papers :