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.341Hard

Which approach is more efficient for passing large structures to functions?

Q.342Easy

What is the primary purpose of function prototypes in C?

Q.343Easy

Which of the following is a valid function declaration in C?

Q.344Easy

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

Q.345Medium

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

Q.346Medium

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

Q.347Medium

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

Q.348Easy

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.349Medium

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

Q.350Medium

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

Q.351Easy

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.352Medium

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

Q.353Medium

What is the primary advantage of using inline functions?

Q.354Medium

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

Q.355Hard

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

Q.356Medium

Which approach correctly implements a function returning multiple values?

Q.357Hard

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

Q.358Easy

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

Q.359Hard

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

Q.360Medium

Which of the following correctly declares a variadic function?