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

Which statement about function parameters passed as arrays is correct?

Q.22Medium

What is the purpose of the 'extern' keyword when used with a function?

Q.23Medium

Consider: void modify(int *ptr) { *ptr = 20; } int main() { int x = 10; modify(&x); printf("%d", x); }. Output?

Q.24Medium

What does variadic function mean in C?

Q.25Medium

Which of the following correctly demonstrates inline function usage for optimization?

Q.26Medium

What is the output of this code? void swap(int a, int b) { int temp = a; a = b; b = temp; } int main() { int x = 5, y = 10; swap(x, y); printf("%d %d", x, y); }

Q.27Medium

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

Q.28Medium

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

Q.29Medium

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

Q.30Medium

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

Q.31Medium

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

Q.32Medium

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

Q.33Medium

What is the primary advantage of using inline functions?

Q.34Medium

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

Q.35Medium

Which approach correctly implements a function returning multiple values?

Q.36Medium

Which of the following correctly declares a variadic function?

Q.37Medium

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

Which of the following correctly demonstrates function recursion termination?

Q.39Medium

What does the const qualifier do when applied to function parameters?

Q.40Medium

Which statement about extern functions is correct?