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.61Easy

What happens when a function is called without a return statement reaching the end?

Q.62Medium

In C, how many parameters can a function have at maximum?

Q.63Medium

What is the scope of a static variable declared inside a function?

Q.64Medium

Which calling convention passes parameters through the stack from right to left?

Q.65Easy

What will be the output of the following code?
int add(int a, int b) { return a + b; }
int main() { printf("%d", add(5, add(3, 2))); return 0; }

Q.66Medium

What is the difference between call by value and call by reference in C?

Q.67Medium

Analyze the following pointer to function declaration: int (*ptr)(int, int);

Q.68Easy

What is the output of this recursive function?
int fact(int n) { if(n<=1) return 1; return n*fact(n-1); }
main() { printf("%d", fact(4)); }

Q.69Medium

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

Q.70Medium

What is the primary advantage of using inline functions?

Q.71Medium

Consider the function: void func(int *arr, int size). Which statement is correct?

Q.72Hard

What does the restrict keyword do when used with pointer parameters in C99?

Q.73Medium

Which approach correctly implements a function returning multiple values?

Q.74Hard

What will this code output?
int x = 10;
int* getAddress() { return &x; }
main() { int *ptr = getAddress(); printf("%d", *ptr); }

Q.75Easy

In C, what is the purpose of the return statement in a void function?

Q.76Hard

What happens when a function with variadic parameters is called with fewer arguments than expected?

Q.77Medium

Which of the following correctly declares a variadic function?

Q.78Medium

What will be the output of this code?
int counter = 0;
void increment() { static int count = 0; count++; counter++; }
main() { increment(); increment(); printf("%d %d", count, counter); }

Q.79Easy

Which of the following is a correct function prototype in C?

Q.80Easy

What is the scope of a static function in C?