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
Which control flow statement allows jumping to a labeled location in C?
In the ternary operator expression (condition ? expr1 : expr2), if condition is true, which expression evaluates?
Which statement is true about the goto statement in modern C programming?
In a for loop for(int i = 0; i < 5; i++), at what point does the increment happen?
In a nested loop structure, which statement is used to skip the current iteration of the innermost loop only?
Which looping construct in C allows initialization, condition, and increment to be placed in a single line?
In which scenario would a do-while loop be preferred over a while loop?
What is the purpose of the ternary operator (? :) in C?
Which statement is true about the goto statement in modern C programming practices?
What is the primary difference between 'break' and 'continue' statements in C loops?
Consider the following code snippet: int x = 5; do { printf("%d ", x); x--; } while(x > 0); What will be the output?
What is the primary purpose of using functions in C programming?
Which keyword is used to define a function in C?
Which of the following is a correct function declaration?
What will be the output of the following code? int func(int x) { return x * 2; } int main() { printf("%d", func(5)); }
How many times can a function be called in a C program?
What is the return type of the strlen() function in C?
What is the scope of a function parameter in C?
Which keyword is used to create a function that can be expanded inline by the compiler without actual function call overhead?
Consider: int func(int x) { return ++x; } What is the difference if we use x++ instead of ++x?