Multiple choice technology mainframe

find the error in following code(GIVE THE LINE NO) 1 IF A > B 2 MOVE 1 TO FLAG-A 3 MOVE 200 TO VALUE-B. 4 IF VALUE-B > 20 5 GO TO EXIT-PARA 6 END-IF 7 END-IF

  1. 2

  2. 3

  3. 4

  4. 5

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

In COBOL, a period ('.') terminates the entire IF statement structure. In line 3, 'MOVE 200 TO VALUE-B.' has a period at the end, which prematurely terminates the outer 'IF A > B' statement. Thus, the subsequent 'END-IF' lines will cause compiler errors as they are unmatched.