MCQOPTIONS
Saved Bookmarks
This section includes 8 Mcqs, each offering curated multiple-choice questions to sharpen your C Programming knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
If #include is used with file name in angular brackets. |
| A. | The file is searched for in the standard compiler include paths |
| B. | The search path is expanded to include the current source directory |
| C. | The search path will expand |
| D. | None of the mentioned |
| Answer» B. The search path is expanded to include the current source directory | |
| 2. |
The preprocessor provides the ability for _______________ |
| A. | The inclusion of header files |
| B. | The inclusion of macro expansions |
| C. | Conditional compilation and line control |
| D. | All of the mentioned |
| Answer» E. | |
| 3. |
What is #include directive? |
| A. | Tells the preprocessor to grab the text of a file and place it directly into the current file |
| B. | Statements are not typically placed at the top of a program |
| C. | All of the mentioned |
| D. | None of the mentioned |
| Answer» B. Statements are not typically placed at the top of a program | |
| 4. |
The C-preprocessors are specified with _________symbol. |
| A. | # |
| B. | $ |
| C. | ” ” |
| D. | & |
| Answer» B. $ | |
| 5. |
What will be the output of the following C code? |
| A. | 1, 1 |
| B. | 1, 2 |
| C. | 2, 1 |
| D. | 2, 2View Answer |
| Answer» C. 2, 1 | |
| 6. |
#pragma exit is primarily used for? |
| A. | Checking memory leaks after exiting the program |
| B. | Informing Operating System that program has terminated |
| C. | Running a function at exiting the program |
| D. | No such preprocessor exist |
| Answer» D. No such preprocessor exist | |
| 7. |
#include statement must be written __________ |
| A. | Before main() |
| B. | Before any scanf/printf |
| C. | After main() |
| D. | It can be written anywhere |
| Answer» C. After main() | |
| 8. |
Which of the following are C preprocessors? |
| A. | #ifdef |
| B. | #define |
| C. | #endif |
| D. | all of the mentioned |
| Answer» E. | |