Which is NOT a section of all types of loops ?

  1. Initialization

  2. Loop Body

  3. Test statement

  4. The word "while"


Correct Option: D
Explanation:

To solve this question, the user needs to know the basic structure of loops. Every loop has three main sections:

  1. Initialization
  2. Loop Body
  3. Test Statement

The initialization section is used to initialize the loop variable, while the test statement is used to evaluate a condition that determines whether the loop should continue or terminate. The loop body contains the code that is executed repeatedly until the test statement evaluates to false.

Option D is not a section of all types of loops. "While" is a keyword that is used to define a type of loop known as a "while loop". However, not all types of loops use the keyword "while". For example, the "for loop" uses a different syntax to define the loop.

Therefore, the correct answer is:

The Answer is: D

Find more quizzes: