Important MCQ

The three parts of for are separated by

Q.The three parts of for are separated by

A) colons
B) commas
C) semicolons
D) dots
Correct Answer:
Option C
Detailed Explanation:
C) semicolons is correct. A for loop has initialization, condition, and update parts separated by semicolons. Initialization runs once; the condition controls repetition and the update changes the loop variable.