Preprocessor – C Multiple Choice Questions and Answers

The C-preprocessors are specified with _________symbol.

Explanation: The C-preprocessors are specified with # symbol.

Preprocessor feature that supply line numbers and file names to compiler is called?

#include are _______ files and #include “somefile.h” ________ files.

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

The preprocessor provides the ability for _______________.

Explanation: The preprocessor provides the ability for the inclusion of header files, macro expansions, conditional compilation, and line control.

Which of the following are C preprocessors?

C preprocessor is conceptually the first step during compilation.

Property which allows to produce different executable for different platforms in C is called?

Explanation: Conditional compilation is the preprocessor facility to produce different executable.

#include is called

#pragma exit is primarily used for?

Explanation: It is primarily used for running a function upon existing the program.

A preprocessor is a program.

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

C preprocessors can have compiler specific features.

Explanation: #pragma is compiler specific feature.

#include statement must be written.

Explanation: Using these directives before main() improves readability.

The #include directive

Explanation: The #include directive tells the preprocessor to grab the text of a file and place it directly into the current file and are statements are typically placed at the top of a program.

If #include is used with file name in angular brackets.

Explanation: With the #include, if the filename is enclosed within angle brackets, the file is searched for in the standard compiler include paths.