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. Method

  4. None of the Above

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

COBOL's PERFORM ... UNTIL structure executes at least once before checking the condition, which is the defining behavior of a post-test loop like do-while in Java/C++. While PERFORM ... VARYING resembles a for loop, the generic 'perform loop' term typically refers to the UNTIL variant, making do-while the best match.