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

In a for loop with multiple break statements in different conditions, which break will be executed?

Q.142Medium

In nested loops, if an inner loop contains a break statement, what happens?

Q.143Medium

Analyze this code: for(int i = 0; i < 5; i++) { if(i == 2) continue; if(i == 3) break; printf("%d ", i); } What is the output?

Q.144Medium

Which of the following statements about the switch-case construct is INCORRECT?

Q.145Medium

What is the default return type of a function in C if not specified?

Q.146Medium

What is the difference between function declaration and function definition?

Q.147Medium

What happens if a function does not have a return statement?

Q.148Medium

Which of the following function calls is valid? int calculate(int a, float b, char c);

Q.149Medium

What is a recursive function?

Q.150Medium

What is the issue with the following code? int factorial(int n) { return n * factorial(n-1); }

Q.151Medium

In C, are function parameters passed by value or by reference by default?

Q.152Medium

What will be the output? void modify(int x) { x = x + 10; } int main() { int a = 5; modify(a); printf("%d", a); }

Q.153Medium

Which of the following correctly declares a function pointer that points to a function returning int and taking two int parameters?

Q.154Medium

In C, when a function is called with fewer arguments than declared, what happens?

Q.155Medium

What will be printed by this code? void func(int arr[10]) { printf("%lu", sizeof(arr)); } int main() { int a[10]; func(a); }

Q.156Medium

What is the correct way to declare a function that accepts variable number of arguments?

Q.157Medium

Which of the following is true about a static function in C?

Q.158Medium

What happens if a function declared as returning int doesn't contain a return statement?

Q.159Medium

Which of the following correctly represents a callback function scenario?

Q.160Medium

Which of the following about function declaration and definition is TRUE?