C Programming - MCQ Practice Questions
Practice free C Programming multiple-choice questions with detailed answers and explanations. Perfect for competitive exam preparation.
978 questions | 100% Free
Which of the following is NOT a preprocessor directive in C?
What is the output of the following code? #define MAX 5 int arr[MAX];
Which preprocessor directive is used to include standard library files?
What does the following preprocessor directive do? #define SQUARE(x) ((x)*(x))
What is the output? #define MAX(a,b) (a>b?a:b) printf("%d", MAX(10, 5));
What is the purpose of the #undef directive?
What is the primary role of the C preprocessor in the compilation process?
Which of the following is NOT a preprocessor directive?
Which preprocessor directive is used to conditionally compile code based on whether a macro is defined?
Which statement about preprocessor is TRUE?
Which preprocessor directive should be used to check if a macro is NOT defined?
Which header file is included using angle brackets in standard C library?
Which preprocessor directive is used to define a constant that cannot be changed during program execution?
Which of the following is a difference between #include <file.h> and #include "file.h"?
Consider the following code: #define PI 3.14 #undef PI #define PI 3.14159 What is the value of PI after execution?
Which header file must be included to use the NULL macro?
Which of the following correctly demonstrates the use of conditional compilation?
What is the output of the following code? #define PI 3.14 int main() { printf("%f", PI); return 0; }
What does the ## operator in preprocessor do?
Which predefined macro gives the line number in the source file?