Multiple choice technology mainframe

The COBOL perform loop is the equivalent of which of the following structures found in other languages, such as Java or C++

  1. for loop

  2. do while loop

  3. nested loop

  4. none of the above

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The COBOL PERFORM loop is equivalent to a do-while loop found in languages like Java and C++. Both structures execute the loop body at least once before testing the continuation condition, making them different from while loops which test the condition before the first iteration.