iGET

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

Q.1Easy

Which of the following is NOT a preprocessor directive in C?

Q.2Easy

What is the output of the following code? #define MAX 5 int arr[MAX];

Q.3Easy

Which preprocessor directive is used to include standard library files?

Q.4Easy

What does the following preprocessor directive do? #define SQUARE(x) ((x)*(x))

Q.5Easy

What is the output? #define MAX(a,b) (a>b?a:b) printf("%d", MAX(10, 5));

Q.6Easy

What is the purpose of the #undef directive?

Q.7Easy

What is the primary role of the C preprocessor in the compilation process?

Q.8Easy

Which of the following is NOT a preprocessor directive?

Q.9Easy

Which preprocessor directive is used to conditionally compile code based on whether a macro is defined?

Q.10Easy

Which statement about preprocessor is TRUE?

Q.11Easy

Which preprocessor directive should be used to check if a macro is NOT defined?

Q.12Easy

Which header file is included using angle brackets in standard C library?

Q.13Easy

Which preprocessor directive is used to define a constant that cannot be changed during program execution?

Q.14Easy

Which of the following is a difference between #include <file.h> and #include "file.h"?

Q.15Easy

Consider the following code: #define PI 3.14 #undef PI #define PI 3.14159 What is the value of PI after execution?

Q.16Easy

Which header file must be included to use the NULL macro?

Q.17Easy

Which of the following correctly demonstrates the use of conditional compilation?

Q.18Easy

What is the output of the following code? #define PI 3.14 int main() { printf("%f", PI); return 0; }

Q.19Easy

What does the ## operator in preprocessor do?

Q.20Easy

Which predefined macro gives the line number in the source file?