Sail E0 Webinar

MCQs

Total Questions : 14 | Page 1 of 2 pages
Question 1. Property which allows to produce different executable for different platforms in C is called?
  1.    File inclusion
  2.    Selective inclusion
  3.    Conditional compilation
  4.    Recursive macros
 Discuss Question
Answer: Option C. -> Conditional compilation


Conditional compilation is the preprocessor facility to produce different executable.


Question 2. Preprocessor feature that supply line numbers and file names to compiler is called?
  1.    Selective inclusion
  2.    macro substitution
  3.    Concatenation
  4.    Line control
 Discuss Question
Answer: Option D. -> Line control


None.


Question 3. C preprocessor is conceptually the first step during compilation.
  1.    true
  2.    false
  3.    Depends on the compiler
  4.    Depends on the standard
 Discuss Question
Answer: Option A. -> true


None.


Question 4. C preprocessors can have compiler specific features.
  1.    true
  2.    false
  3.    Depends on the standard
  4.    Depends on the platform
 Discuss Question
Answer: Option A. -> true


#pragma is compiler specific feature.


Question 5. #include is called
  1.    Preprocessor directive
  2.    Inclusion directive
  3.    File inclusion directive
  4.    None of the mentioned
 Discuss Question
Answer: Option A. -> Preprocessor directive


None.


Question 6. #include are _______ files and #include "somefile.h ________ files.
  1.    Library, Library
  2.    Library, user-created header
  3.    User-created header, library
  4.    They can include all types of file
 Discuss Question
Answer: Option D. -> They can include all types of file


Both of these statement can be used to select any file.


Question 7. Which of the following are C preprocessors?
  1.    #ifdef
  2.    #define
  3.    #endif
  4.    All of the mentioned.
 Discuss Question
Answer: Option D. -> All of the mentioned.


None.


Question 8. A preprocessor is a program.
  1.    That processes its input data to produce output that is used as input to another program
  2.    That is nothing but a loader
  3.    That links various source files
  4.    All of the mentioned
 Discuss Question
Answer: Option A. -> That processes its input data to produce output that is used as input to another program


A preprocessor is a preprocessor is a program that processes its input data to produce output that is used as input to another program.


Question 9. #pragma exit is primarily used for?
  1.    Checking memory leaks after exitting the program
  2.    Informing Operating System that program has terminated
  3.    Running a function at exitting the program
  4.    No such preprocessor exist
 Discuss Question
Answer: Option C. -> Running a function at exitting the program


It is primarily used for running a function upon exitting the program.


Question 10. #include statement must be written.
  1.    Before main()
  2.    Before any scanf/printf
  3.    After main()
  4.    It can be written anywhere
 Discuss Question
Answer: Option B. -> Before any scanf/printf


Using these directives before main() improves readability.


Latest Videos

Latest Test Papers