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

What is the output of this complex nested control flow?
int x = 1, y = 2;
if (x < y) {
x++; y--;
if (x == y)
printf("Equal");
else
printf("NotEqual");
}

Q.202Easy

In C, which control flow statement is used to terminate a loop prematurely?

Q.203Medium

Which of the following is NOT a valid use of the goto statement in C?

Q.204Easy

What is the primary difference between a while loop and a do-while loop?

Q.205Easy

In a nested loop structure, which statement will skip only the inner loop's current iteration?

Q.206Medium

Consider a switch statement with multiple cases. If a case matches and break is omitted, what happens?

Q.207Medium

What will be the behavior of a for loop with an empty body and no statements inside braces?

Q.208Easy

In the expression (x > 5) ? (y = 10) : (y = 20), what does y equal if x is 3?

Q.209Easy

Which control flow structure allows execution of code only if a certain condition is met?

Q.210Medium

What is the output of executing break in a nested loop context?

Q.211Easy

In a switch statement, which keyword provides a default case if no cases match?

Q.212Easy

What is the correct syntax for a for loop that iterates from 0 to 9?

Q.213Medium

Which of the following correctly uses the conditional (ternary) operator?

Q.214Medium

How many times will a do-while loop execute if the condition is initially false?

Q.215Medium

In control flow, which statement is used to explicitly exit from a program?

Q.216Hard

What happens when continue is used in a for loop with a post-increment expression?

Q.217Easy

Which control structure allows checking multiple conditions in sequence using else-if?

Q.218Medium

In a switch statement, case values must be of which type?

Q.219Hard

What is the effect of using multiple break statements in nested loops?

Q.220Medium

What is the scope of a variable declared in the initialization section of a for loop?