C-Control Instructions Questions and Answers
Practice ModeShowing 10 of 24 questions
Q11
How many times will this loop execute: while(0){ printf("Hello"); }
Answer: Option A
Explanation: While(0) means false condition, so loop never executes.
Q12
What is the purpose of switch statement in C?
Answer: Option C
Explanation: Switch provides multi-way branching based on different cases.
Q13
Which is mandatory in a switch statement?
Answer: Option C
Explanation: Default case is optional, break is optional, but case values are mandatory for functionality.
Q14
What happens if break is omitted in a switch case?
Answer: Option C
Explanation: Without break, execution falls through to the next case.
Q15
Which operator has highest precedence in condition checks?
Answer: Option C
Explanation: Logical NOT has higher precedence than AND and OR operators.
Q16
What is the result of: if(5) printf("True"); else printf("False");
Answer: Option A
Explanation: Non-zero values are considered true in C conditions.
Q17
Which is not a jump statement in C?
Answer: Option D
Explanation: Return is used for functions, not specifically for jumping within control structures.
Q18
What is goto statement used for?
Answer: Option C
Explanation: Goto provides unconditional jump to a labeled statement in the same function.
Q19
Which loop is best when number of iterations is known?
Answer: Option C
Explanation: For loop is ideal when iteration count is known beforehand.
Q20
What does while(1) represent?
Answer: Option B
Explanation: While(1) creates an infinite loop as condition is always true.