Multiple choice technology mainframe

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

  1. Infinite loop

  2. Logical Error

  3. All of the above

  4. None of the abov

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

A COBOL IF statement itself cannot cause infinite loops (that requires PERFORM/GO TO), and syntax errors would be caught at compile time, not runtime logical errors. The statement asks which errors are possible 'within a COBOL if statement' - meaning inherent to the IF construct itself, not in the statements it executes. The answer is that none of these error types are inherent to IF.