MCQOPTIONS
Saved Bookmarks
This section includes 5 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. |
Can function definition be present in header files? |
| A. | Yes |
| B. | No |
| C. | Depends on the compiler |
| D. | Depends on the standard |
| Answer» C. Depends on the compiler | |
| 2. |
How is search done in #include and #include”somelibrary.h” normally or conventionally?$ |
| A. | When former is used, current directory is searched and when latter is used, standard directory is searched |
| B. | When former is used, predefined directory is searched and when latter is used, current directory is searched and then predefined directories are searched |
| C. | When former is used, search is done in implementation defined manner and latter is used to search current directory |
| D. | For both, search for somelibrary is done in implementation-defined manner |
| Answer» E. | |
| 3. |
How is search done in #include and #include “somelibrary.h” according to C standard?$ |
| A. | When former is used, current directory is searched and when latter is used, standard directory is searched |
| B. | When former is used, standard directory is searched and when latter is used, current directory is searched |
| C. | When former is used, search is done in implementation defined manner and when latter is used, current directory is searched |
| D. | For both, search for ‘somelibrary’ is done in implementation-defined places |
| Answer» C. When former is used, search is done in implementation defined manner and when latter is used, current directory is searched | |
| 4. |
What would happen if you create a file stdio.h and use #include “stdio.h”?$ |
| A. | The predefined library file will be selected |
| B. | The user-defined library file will be selected |
| C. | Both the files will be included |
| D. | The compiler won’t accept the program |
| Answer» C. Both the files will be included | |
| 5. |
Which directory the compiler first looks for the file when using #include? |
| A. | Current directory where program is saved |
| B. | C:COMPILERINCLUDE |
| C. | S:SOURCEHEADERS |
| D. | Both C:COMPILERINCLUDE and S:SOURCEHEADERS simultaneously |
| Answer» B. C:COMPILERINCLUDE | |