MCQ
Single Best Answer
Moderate
QWhich component of a for loop is executed only once?
ID: #23072
For Loop in Programming Language
82 views
Question Info
#23072Q ID
ModerateDifficulty
For Loop in Programming LanguageTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer: Option A
Explanation
In a for loop, the initialization section is executed only once when the loop starts. It typically sets up the loop control variable, which controls how many times the loop will iterate. The condition check and increment sections are executed with each iteration of the loop. The condition is checked before every iteration, and the increment occurs at the end of each iteration. The loop body is also executed during each iteration if the condition is true. Once the loop is initialized, it doesn't reset the loop variable until the loop finishes.
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic