

MCQOPTIONS
Saved Bookmarks
This section includes 6 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» B. No | |
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» C. When former is used, search is done in implementation defined manner and latter is used to search current directory | |
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» E. | |
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» C. S:SOURCEHEADERS | |
6. |
What is the sequence for preprocessor to look for the file within <>? |
A. | The predefined location then the current directory |
B. | The current directory then the predefined location |
C. | The predefined location only |
D. | The current directory location |
Answer» B. The current directory then the predefined location | |