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

How does the volatile keyword affect function behavior in C?

Q.322Medium

Which of the following is a valid function pointer initialization?

Q.323Easy

Which storage class specifier allows a function to be called only within the file where it is defined?

Q.324Easy

What is the return type of a function that performs an action but doesn't return any value?

Q.325Easy

In C, what happens when a function is called before its declaration?

Q.326Easy

Which of the following is an example of call by value in C?

Q.327Easy

What is the main difference between function declaration and function definition?

Q.328Medium

Consider the code: int calculate(int a, int b = 5) { return a + b; }. What is the issue?

Q.329Medium

What will be the output of this recursive function? int fact(int n) { if(n <= 1) return 1; return n * fact(n-1); } fact(5)

Q.330Medium

Which statement about function parameters passed as arrays is correct?

Q.331Medium

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

Q.332Medium

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

Q.333Medium

What does variadic function mean in C?

Q.334Medium

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

Q.335Hard

What will happen if a recursive function has no base case?

Q.336Hard

Consider mutual recursion: void funcA(int n); void funcB(int n); funcA calls funcB and vice versa. What is required?

Q.337Hard

What is the correct way to return multiple values from a function in C?

Q.338Hard

Analyze: int (*funcPtr)(int, int); What does this declaration represent?

Q.339Medium

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

In C99 standard, what is true about function declarations at block scope?