iGET

C Programming - MCQ Practice Questions

C questions in placement tests and university exams are rarely about syntax alone. Most of what you will find here is output prediction, pointer arithmetic, arrays and strings, structures and unions, storage classes, recursion, and file handling. The explanations walk through memory behaviour step by step, which is usually where the confusion sits rather than in the code itself.

972 questions | 100% Free

Q.21Easy

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.22Easy

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.23Easy

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

Q.24Easy

Which of the following is a correct function prototype in C?

Q.25Easy

What is the scope of a static function in C?

Q.26Easy

Which keyword is used to pass arguments by reference in C?

Q.27Easy

What is the difference between declaring a function and defining a function?

Q.28Easy

Consider the function declaration: void func(int x); and later in the code: int result = func(5);. What will be the compilation result?