Important MCQ

The condition of an if is written inside

Q.The condition of an if is written inside

A) square brackets
B) parentheses ( )
C) braces { }
D) quotes
Correct Answer:
Option B
Detailed Explanation:
B) parentheses ( ) 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.