Important MCQ

if (x > 5); with a semicolon after the condition

Q.if (x > 5); with a semicolon after the condition

A) stops the program
B) is correct and required
C) creates an empty body
D) makes the loop run
Correct Answer:
Option C
Detailed Explanation:
C) creates an empty body is correct. An if statement executes its body only when its condition is true. The condition is written in parentheses, and braces group multiple statements.