C Preprocessor-2
1. What is the C keyword used to create global Constants?
a) constant
b) definition
c) def
d) define
Answer: D
#define KM 1.6.
2. What is the output file generated after processing a .C file?
a) .h file
b) .exe file
c) .cp file
d) .bak file
Answer: B
Yes, C program is converted to an executable file for distribution to outside world instead of sharing your original source code which may be copy righted logic.
3. How do you safeguard your .C file code from copying by outside developers or world?
a) Encrypt a C file and share
b) Obfuscate a C file and share
c) Scramble a C file and share
d) Convert to Exe and share
Answer: D
No explaination is given for this question.
4. How do you separate a multiline macro in C language?
a) Using * operator
b) Using % operator
c) Using \ operator
d) Using + operator
Answer: C
No explaination is given for this question.
5. What is the file extension of expanded source code of .C file after preprocessing?
a) .e file
b) .h file
c) .l file
d) .p file
Answer: C
def.c is converted into def.l file.
6. #include is called
a) Preprocessor directive
b) Inclusion directive
c) File inclusion directive
d) None of the mentioned
Answer: A
No explaination is given for this question.
7.C preprocessors can have compiler specific features.
a) True
b) False
Answer: A
No explaination is given for this question.
8. Which is correct about the following code?
#define FACT 1
a) conditional compilation
b) File inclusion
c) Macro
d) All of the above
Answer: C
No explaination is given for this question.
9. Macro is generally written in
a) lower case letters
b) upper case letters
c) camel case letters
d) Any of the above
Answer: B
No explaination is given for this question.
10. We can define macros with argument?
a) True
b) False
Answer: A
No explaination given for this question.