iGET

C Programming - MCQ Practice Questions

C questions in placement tests and university exams are rarely about syntax alone. Most of what you will find here is output prediction, pointer arithmetic, arrays and strings, structures and unions, storage classes, recursion, and file handling. The explanations walk through memory behaviour step by step, which is usually where the confusion sits rather than in the code itself.

972 questions | 100% Free

Q.1Hard

What will be the output of: int x = 10; printf("%d %d", x, x++);

Q.2Hard

Consider the expression: int arr[5]; What does arr represent without the index?

Q.3Hard

Which storage class has a default value of 0 if not explicitly initialized?

Q.4Hard

What will be the output of the following code?
#include <stdio.h>
int main() {
int x = 5;
printf("%d", ++x + x++);
return 0;
}

Q.5Hard

What is the main difference between #define and const in C?

Q.6Hard

Which of the following correctly declares a function pointer?

Q.7Hard

What will be the output of the following code?
#include <stdio.h>
int main() {
int x = 5;
int y = ++x * ++x;
printf("%d", y);
return 0;
}

Q.8Hard

Consider a function declared as 'static int func()'. What is the scope of this function?

Q.9Hard

What is the output of: printf("%d", (int)3.7);?

Q.10Hard

Which of the following best describes the 'register' storage class in modern C compilers?

Q.11Hard

What will be the output of: int x = 5; printf("%d", x++ + ++x);

Q.12Hard

What is the result of: int x = 10; int y = x++ + x++;

Q.13Hard

What is the output of: int x = 5; int y = ++x + x++;

Q.14Hard

What is the scope of a variable declared inside a block with 'static'?

Q.15Hard

What will be the output of: int a = 1; int b = 2; a = a + b; b = a - b; a = a - b; printf("%d %d", a, b);

Q.16Hard

Which of the following about function pointers in C is correct?

Q.17Hard

What is the output of: float x = ; printf("%f", x);

Q.18Hard

Which of the following correctly uses memcpy()?

Q.19Hard

Consider the following declaration:
int (*func_ptr)(int, int, int);
Which of the following function signatures can be correctly assigned to func_ptr?