Multiple choice cobol

Which one of the following is not a valid statement?

  1. Multiply corresponding record1 by record2

  2. Add corresponding record1 to record2

  3. Move corresponding record1 to record2

  4. Subtract corresponding record1 from record2

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

COBOL allows ADD CORRESPONDING, MOVE CORRESPONDING, and SUBTRACT CORRESPONDING to operate on matching elementary items between group records. MULTIPLY CORRESPONDING is not a valid COBOL verb - the CORRESPONDING phrase is only supported with ADD, SUBTRACT, and MOVE statements.

AI explanation

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

Option A) Multiply corresponding record1 by record2 - This option is not a valid statement because multiplying two records is not a well-defined operation. Multiplication is typically performed on individual values rather than entire records.

Option B) Add corresponding record1 to record2 - This option is a valid statement because adding two records is a valid operation. It involves adding corresponding values from each record.

Option C) Move corresponding record1 to record2 - This option is a valid statement. It suggests moving the values from record1 to record2.

Option D) Subtract corresponding record1 from record2 - This option is a valid statement because subtracting one record from another involves subtracting corresponding values from each record.

The correct answer is A. This option is not a valid statement because multiplying two records is not a well-defined operation.