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

What is the primary purpose of using functions in C programming?

Q.2Easy

Which keyword is used to define a function in C?

Q.3Easy

Which of the following is a correct function declaration?

Q.4Easy

What will be the output of the following code? int func(int x) { return x * 2; } int main() { printf("%d", func(5)); }

Q.5Easy

How many times can a function be called in a C program?

Q.6Easy

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

Q.7Easy

What is the scope of a function parameter in C?

Q.8Easy

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

Q.9Easy

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

Q.10Easy

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

Q.11Easy

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

Q.12Easy

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

Q.13Easy

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

Q.14Easy

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

Q.15Easy

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

Q.16Easy

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

Q.17Easy

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

Q.18Easy

What is the primary purpose of function prototypes in C?

Q.19Easy

Which of the following is a valid function declaration in C?

Q.20Easy

What happens when a function is called without a return statement reaching the end?