Multiple choice technology mainframe

Which of the following errors are possible within a COBOL if statement?

  1. Infinite loop

  2. Logical Error

  3. Runtime Error

  4. All of the above

  5. None of the above

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

COBOL IF statements can encounter logical errors (wrong condition logic), runtime errors (invalid data type comparison), and infinite loops (when combined with PERFORM or if condition never becomes false due to state changes). All three error types are possible in IF-based control flow.