Single Choice Moderate

QAlways use ______ around blocks:

ID: #25945 MCQ Quiz - Class 8 - Decision Control Structure 3 views
Question Info
#25945Q ID
ModerateDifficulty
MCQ Quiz - Class 8 - Decision Control StructureTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A Braces { }
  • B Parentheses ( )
  • C Brackets [ ]
  • D None
Correct Answer

Explanation

Correct Answer Explanation:

Always use braces around if/else blocks — even for single statements. This prevents subtle bugs when modifying code later.

Why the other options are incorrect:

  • Option B: Parentheses are for the condition, not the block.
  • Option C: Square brackets are for arrays.
  • Option D: Using no braces can cause bugs.

Share This Question

Challenge a friend or share with your study group.