Multiple choice technology mainframe

Where is a period required in Cobol?

  1. After the last statement in each paragraph

  2. At the end of the word DIVISION

  3. At the end of the word SECTION

  4. All of the above

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

COBOL syntax requires periods to mark the end of major structural elements: each paragraph's last statement, each DIVISION keyword, and each SECTION keyword. These periods are mandatory delimiters in COBOL's strict hierarchical structure. Omitting any of these periods will cause compilation errors.

AI explanation

To answer this question, let's go through each option to understand why it is correct or incorrect:

Option A) After the last statement in each paragraph - This option is correct. In COBOL, a period is required after the last statement in each paragraph to mark the end of the paragraph.

Option B) At the end of the word DIVISION - This option is correct. In COBOL, a period is required at the end of the word DIVISION to mark the end of the division.

Option C) At the end of the word SECTION - This option is correct. In COBOL, a period is required at the end of the word SECTION to mark the end of the section.

Option D) All of the above - This option is correct. As explained in options A, B, and C, a period is required after the last statement in each paragraph, at the end of the word DIVISION, and at the end of the word SECTION. Therefore, all of the above options are correct.

The correct answer is D. This option is correct because all of the above statements are true.