In a ‘for’ loop, what section of the loop is not included in the parentheses after “for” ?

  1. Initialization

  2. Loop Body

  3. Test statement

  4. Update


Correct Option: B

AI Explanation

To answer this question, let's go through each option to understand why it is correct or incorrect:

Option A) Initialization - This option is incorrect because the initialization section is included in the parentheses after "for". It is typically used to initialize a counter variable.

Option B) Loop Body - This option is correct. The loop body is not included in the parentheses after "for". It is the block of code that is executed repeatedly as long as the test statement is true.

Option C) Test statement - This option is incorrect because the test statement is included in the parentheses after "for". It is used to check the condition for executing the loop body.

Option D) Update - This option is incorrect because the update section is included in the parentheses after "for". It is used to update the counter variable after each iteration of the loop.

The correct answer is B) Loop Body. This option is correct because the loop body is not included in the parentheses after "for".

Find more quizzes: