C Preprocessor MCQs
Practice free C Preprocessor multiple-choice questions with instant answer feedback and step-by-step solutions. Click an option to check yourself, reveal the full explanation, and work through all 93 questions — no login required.
Question 73easy
Which of the following is not a preprocessor directive?
Question 74easy
The preprocessor directive which is used to remove the definition of an identifier which was previously defined with #define?
Question 75medium
The function of __attribute__((packed)); can also be performed using . . . . . . . .
Advertisement
Question 76medium
The preprocessor directive which checks whether a constant expression results in a zero or non-zero value . . . . . . . .
Question 77easy
What will be the output of the following C code?
#include<stdio.h>
void f()
{
#define sf 100
printf("%d",sf);
}
int main()
{
#define sf 99;
f();
printf("%d",sf);
}Question 78easy
What will be the output of the following C code?
#define HELLO(a) #a
main()
{
printf(HELLO(good morning));
}Advertisement
Question 79easy
The purpose of the preprocessor directive #error is that . . . . . . . .
Question 80easy
What will be the output of the following C code?
#include<stdio.h>
#define ram 10
main()
{
#ifdef ram
#define ram 20
#endif
printf("%d",ram);
}Question 81medium
The pragma . . . . . . . . is used to remove an identifier completely from a program.