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

Which of the following is TRUE about inline functions in C99 standard?

Q.302Hard

What is function overloading in the context of C?

Q.303Easy

What is the return type of the strlen() function in C?

Q.304Medium

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

Q.305Medium

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

Q.306Easy

What is the scope of a function parameter in C?

Q.307Easy

Which keyword is used to create a function that can be expanded inline by the compiler without actual function call overhead?

Q.308Medium

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

Q.309Medium

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

Q.310Medium

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

Q.311Medium

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

Q.312Easy

Consider: int func(int x) { return ++x; } What is the difference if we use x++ instead of ++x?

Q.313Medium

Which of the following correctly represents a callback function scenario?

Q.314Easy

What is the output of: int add(int a, int b) { int result = a + b; return result; } If called as add(5, 3)?

Q.315Hard

In C99 and later standards, what is the maximum number of parameters a function can have?

Q.316Easy

What will be the output? int func(int *p) { return *p; } int main() { int x = 10; printf("%d", func(&x)); }

Q.317Medium

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

Q.318Hard

What is the primary advantage of using function pointers in C?

Q.319Easy

In the context of recursion, which of the following is essential to avoid infinite recursion?

Q.320Medium

What will happen when this code executes? void func() { func(); } int main() { func(); }