C/C MCQ Quiz Hub

C Programming - MCQ Questions Set 3

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

1.  A local variable declaration with no storage class specified is by default _________




2. Property which allows to produce different executable for different platforms in C is called?




3. What is #include <stdio.h>?




4. C preprocessors can have compiler specific features.




5. C preprocessor is conceptually the first step during compilation.




6. Preprocessor feature that supply line numbers and filenames to compiler is called?




7. #include <somefile.h> are _______ files and #include “somefile.h” ________ files.




8. What is a preprocessor?




9. Which of the following are C preprocessors?




10. #include statement must be written _____




11.  #pragma exit is primarily used for?




12. The C-preprocessors are specified with _________symbol.




13. What is #include directive?




14. The preprocessor provides the ability for ____




15.  If #include is used with file name in angular brackets.




16. What is the sequence for preprocessor to look for the file within <>?




17. Which directory the compiler first looks for the file when using #include?




18. What would happen if you create a file stdio.h and use #include “stdio.h”?




19. How is search done in #include and #include “somelibrary.h” according to C standard?




20. How is search done in #include and #include”somelibrary.h” normally or conventionally?




21. Can function definition be present in header files?




22. If the file name is enclosed in double quotation marks, then _________




23.  If the file name is enclosed in angle brackets, then ___




24. Which of the following file extensions are accepted with #include?




25. Which of the following names for files not accepted?




26. What is the advantage of #define over const?




27. In a conditional inclusion, if the condition that comes after the if is true, then what will happen during compilation?




28. Conditional inclusion can be used for ______




29. For each #if, #ifdef, and #ifndef directive.




30. The #else directive is used for _________




31. Which of the following can never be sent by call-by-value?




32. Which type of variables can have the same name in a different function?




33. Arguments that take input by user before running a program are called?




34. What is the maximum number of arguments that can be passed in a single function?




35. An array of similar data types which themselves are a collection of dissimilar data type are ___________




36. Comment on an array of the void data type.




37. Which of the following arithmetic operation can be applied to pointers a and b? (Assuming initialization as int *a = (int *)2; int *b = (int *)3;)




38. What is the size of *ptr in a 32-bit machine (Assuming initialization as int *ptr = 10;)?




39.  Which of following logical operation can be applied to pointers? (Assuming initialization int *a = 2; int *b = 3;)




40. Which of the following declaration will result in run-time error?




41. Which of the following is not possible statically in C?




42. What is the correct syntax to send a 3-dimensional array as a parameter? (Assuming declaration int a[5][4][3];)




43. What are the applications of a multidimensional array?




44. Which of the following are themselves a collection of different data types?




45. User-defined data type can be derived by________




46. Which operator connects the structure name to its member name?




47. Which of the following cannot be a structure member?




48. Which of the following return-type cannot be used for a function in C?




49. Which of the following is not possible under any scenario?




50. Which of the following operation is illegal in structures?