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
What is the behavior of goto in C?
Which statement is used to skip remaining iterations and move to next iteration?
In C, which control flow statement is used to terminate a loop prematurely?
What is the primary difference between a while loop and a do-while loop?
In a nested loop structure, which statement will skip only the inner loop's current iteration?
In the expression (x > 5) ? (y = 10) : (y = 20), what does y equal if x is 3?
Which control flow structure allows execution of code only if a certain condition is met?
In a switch statement, which keyword provides a default case if no cases match?
What is the correct syntax for a for loop that iterates from 0 to 9?
Which control structure allows checking multiple conditions in sequence using else-if?
Which keyword is used to exit a loop prematurely in C?
Analyze the code: What happens when condition in if statement is false? if(0) { statements; } else { statements; }
In the ternary operator (? :), what happens if the condition is false?
What will be the result? for(int i = 1; i <= 4; i++) { if(i == 3) break; printf("%d ", i); }
What is printed by this code? int x = 1, y = 2; if(x > y) printf("A"); else if(x < y) printf("B"); else printf("C");
Which statement best describes the difference between break and continue?
What value does the ternary operator return? int result = (5 > 3) ? 10 : 20;
Which of the following control flow statements will cause a compilation error in C?
What is the primary difference between while and do-while loops?
In a switch statement, if a case label is missing the break statement, what occurs?