Loading, please wait...

C Programming Multiple Choice Questions And Answers

Search here for MCQs

Are you preparing for the next job interviews? If yes, trust me this post will help you also we'll suggest you check out a big collection for Programming Full Forms that may help you in your interview:

List of Programming Full Forms 

6. Find out the correct order

  • char < int < double
  • int > char > float
  • char > int > float
  • double > char > int

7. Find out the Output

int main() { int a = 5; float b; printf("%d ", sizeof(++a + b)); printf("%d ", a); return 0; }
  • 3 4
  • 5 6
  • 2 5
  • 4 5

8. Spot The Error

#include #include void display(int num, ...); int main() { display(4, 'A', 'a', 'b', 'c'); return 0; } void display(int num, ...) { char c; int j; va_list ptr; va_start(ptr, num); for(j=1; j<=num; j++) { c = va_arg(ptr, char); printf("%c", c); } }
  • No error and print 4 A a b c
  • Error: unknown variable ptr
  • No error and print A a b c
  • Error: Lvalue required for parameter

9. Which of the data types has the size that is variable?

  • struct
  • int
  • float
  • double

10. maximum value of unsigned interger when interger needs two bye of storage

  • 2^16
  • 2^16-1
  • 2^15-1
  • None of the above