C Programming - C-Preprocessor
Question 1
|
Property which allows to produce different executable for different platforms in C is called?
File inclusion
| |
Selective inclusion
| |
Conditional compilation
| |
Recursive macros
|
Question 2
|
#include is called
Preprocessor directive
| |
Inclusion directive
| |
File inclusion directive
| |
None of the mentioned
|
Question 3
|
C preprocessors can have compiler specific features.
true
| |
false
| |
Depends on the standard
| |
Depends on the platform
|
Question 4
|
What is the output of this C code?
In main
| |
Compilation error as lvalue is required for the expression m*n=10
| |
Preprocessor error as lvalue is required for the expression m*n=10
| |
None of the mentioned
|
Question 5
|
C preprocessor is conceptually the first step during compilation
true
| |
false
| |
Depends on the compiler
| |
Depends on the standard
|
Question 6
|
Preprocessor feature that supply line numbers and filenames to compiler is called?
Selective inclusion
| |
macro substitution
| |
Concatenation
| |
Line control
|
Question 7
|
#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
|
Question 8
|
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
|
Question 9
|
Which of the following are C preprocessors?
#ifdef
| |
#define
| |
#endif
| |
All of the mentioned
|
Question 10
|
#include statement must be written
Before main()
| |
Before any scanf/printf
| |
After main()
| |
It can be written anywhere
|
Question 11
|
#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
|
Question 12
|
What is the output of this C code?
1, 1
| |
1, 2
| |
2, 1
| |
2, 2
|
Question 13
|
The C-preprocessors are specified with _________symbol.
#
| |
$
| |
” ”
| |
None of the mentioned
|
Question 14
|
The #include directive
Tells 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
|
Question 15
|
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
|
Question 16
|
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
|
Check Your Answers:
1. C
2. A
3. A
4. A
5. A
6. D
7. D
8. A
9. D
10. B
11. C
12. B
13. A
14. C
15. D
16. A
0 comments:
Post a Comment