Home
MCQS
C/C MCQ Quiz Hub
Computer Science
Choose a topic to test your knowledge and improve your C/C skills
1. Property which allows to produce different executable for different platforms in C is called?
File inclusion
Selective inclusion
Conditional compilation
Recursive macros
2. #include is called
Preprocessor directive
Inclusion directive
File inclusion directive
None of the mentioned
3. C preprocessors can have compiler specific features.
True
False
Depends on the standard
Depends on the platform
4. Preprocessor feature that supply line numbers and file names to compiler is called?
Selective inclusion
macro substitution
Concatenation
Line control
5. #include are _______ files and #include "somefile.h ________ files.
Library, Library
Library, user-created header
User-created header, library
They can include all types of file
6. A preprocessor is a program.
That processes its input data to produce output that is used as input to another program
That is nothing but a loader
That links various source files
All of the mentioned
7. Which of the following are C preprocessors?
#ifdef
#define
#endif
All of the mentioned
8. #include statement must be written.
Before main()
Before any scanf/printf
After main()
It can be written anywhere
9. #pragma exit is primarily used for?
Checking memory leaks after exitting the program
Informing Operating System that program has terminated
Running a function at exitting the program
No such preprocessor exist
10. The C-preprocessors are specified with _________symbol.
#
$
" "
None of the mentioned
11. The #include directive
ells the preprocessor to grab the text of a file and place it directly into the current file
Statements are typically placed at the top of a program
both a & b
None of a & b
12. The preprocessor provides the ability for _______________.
The inclusion of header files
The inclusion of macro expansions
Conditional compilation and line control.
All of the mentioned
13. If #include is used with file name in angular brackets.
The file is searched for in the standard compiler include paths
The search path is expanded to include the current source directory
Both a & b
None of the mentioned
14. What is the output of this C code? int main() { enum {ORANGE = 12, MANGO, BANANA = 11, APPLE}; printf("APPLE = %d ", APPLE); }
APPLE= 11
APPLE= 12
APPLE= 23
APPLE= 0
Submit