C/C MCQ Quiz Hub

C MCQS:-The ABC of C

Choose a topic to test your knowledge and improve your C/C skills

1. Point out which of the following variables names are valid:




2. C variables are case




3. Binary equivalent of 762 is :-




4. Octal equivalent of 762 is:-




5. A character variable can at a time store _ character(s):-




6. int a,b=6; a=++b + b++; value of a ?




7. What will be the output of the following programs:- #include<stdio.h> int main() { printf("%d,%o,%x",72,72,72); }




8. What will be the output of the following programs:- #include<stdio.h> int main() { char ch; printf("%d",sizeof(ch)); }




9. What will be the output of the following programs:- #include<stdio.h> int main() { int i; printf("%d",sizeof(i)); }




10. What will be the output of the following programs:- #include<stdio.h> int main() { float f; printf("%d",sizeof(f)); }




11. What will be the output of the following programs:- #include<stdio.h> int main() { printf("%d",sizeof(char)); printf("%d",sizeof(int)); printf("%d",sizeof(float)); }




12. What will be the output of the following programs:- #include<stdio.h> int main() { printf("%d",sizeof(2)); }




13. What will be the output of the following programs:- #include<stdio.h> int main() { printf("%d",sizeof(2.0)); }




14. What will be the output of the following programs:- #include<stdio.h> int main() { float f=2.0; printf("%d,%d",sizeof(f),sizeof(2.0)); }




15. What will be the output of the following programs:- #include<stdio.h> int main() { char ch=291; printf("%d,%c",ch,ch); }




16. What will be the output of the following program: #include<stdio.h> int main() { int a,b; a=-3- -3; b=-3- -(-3); printf("%d,%d",a,b); }




17. What will be the output of the following program: #include<stdio.h> int main() { int a; a=3*4%5; printf("%d",a); }




18. What will be the output of the following program:#include<stdio.h>int main(){int a;a=3+4-7*8/5%10;printf(




19. What will be the output of the following program: #include<stdio.h> int main() { int a; a=-3+4-7*8/5%10; printf("%d",a); }




20. What will be the output of the following program: #include<stdio.h> int main() { int a; a=4%5+6%5; printf("%d",a); return 0; }




21. What will be the output of the following program: #include<stdio.h> int main() { int a; a=-3*-4%-6/-5; printf("%d",a); return 0; }




22. What will be the output of the following program: #include<stdio.h> int main() { printf("%d,",4/3); printf("%d,",4/-3); printf("%d,",-4/3); printf("%d",-4/-3); return 0; }




23. What will be the output of the following program: #include<stdio.h> int main() { printf("%d,",4%3); printf("%d,",4%-3); printf("%d,",-4%3); printf("%d",-4%-3); return 0; }




24. What will be the output of the following program: int main() { float a=5,b=2; int c; c=a%b; printf("%d",c); return 0; }




25. What will be the output of the following program: int main() { int c; c= 3 ** 4 - 7 ^ 8; printf("%d",c); return 0; }




26. What will be the output of the following program: int main() { float a=5.b=2; int c; c=300000*300000/300000; printf("%d",c); return 0; }




27. What will be the output of the following program:- int main() { float a=1.5; int b=3; a=b/2+b*8/b-b+a/3; printf("%d",a); return 0; }




28. What will be the output of the following program:- int main() { int i=3,a=4,n; float t=4.2; n=a * a / i + i / 2 * t + 2 +t; printf("%d",n) return 0; }




29. What will be the output of the following program:- int main() { int a,b; a=5.999999; b=5.000001; printf("%d,%d",a,b); return 0; }




30. What will be the output of the following program:- int main() { float a; a=4/2; printf("%f,%f",a,4/2); return 0; }




31. What will be the output of the following program:- int main() { printf("%d,%f",4,4); return 0; }




32. What will be the output of the following program:- int main() { printf("%d,%f",4.0,4.0); return 0; }




33. What will be the output of the following program:- int main() { printf("%d",sizeof(4)/sizeof(2.0)); return 0; }




34. What will be the output of the following program:- int main() { printf("%d",sizeof(4.0)/sizeof(4)); return 0; }




35. What will be the output of the following program,consider 10 as a input:- int main() { scanf("%d",&n); printf("%d",n); return 0; }




36. What will be the output of the following program:- int main() { int a=5,x; x=++a + a++ - ++a; printf("%d",a); return 0; }




37. What will be the output of the following program:- int main() { int a=5,x; x=++a + a++ - ++a; x++; a=a + ++x; printf("%d",a); return 0; }




38. What will be the output of the following program:- int main() { int a=5,x; x=++a + a++ + ++a; printf("%d,%d",x,a);}




39. What will be the output of the following program:- int main() { int a=5,x; x=++a * a++; printf("%d,%d",x,a); return 0; }




40. Binary representation of 345 is :-




41. Decimal representation of 101011001 is :-




42. Decimal representation of 101010001 is :-




43. Decimal representation of 110011001 is :-




44. Decimal representation of 11111001 is :-




45. Decimal representation of 11111111 is :-




46. Octal representation of 11111001 is :-




47. Hexadecimal representation of 11111001 is :-




48. Binary representation of F9 is :-




49. Binary representation of 371(octal) is :-