When using binary (COMP) data items, the use of the SYNCHRONIZED clause specifies that

  1. (1) The binary data items will be properly aligned only on halfword boundaries.

  2. (2) The binary data items will be properly aligned only on fullword boundaries.

  3. (3) The binary data items will be properly aligned only on doubleword boundaries.

  4. (4) The binary data items will be properly aligned on halfword, fullword, or doubleword boundaries.


Correct Option: D
Explanation:

To solve this question, the user needs to know about the SYNCHRONIZED clause in COBOL and how it affects binary data items.

The SYNCHRONIZED clause in COBOL is used to specify the alignment of data items in memory. When used with binary data items, it ensures that the data is stored in a way that is compatible with the hardware on which the program is running.

Now, let's go through each option and explain why it is right or wrong:

A. (1) The binary data items will be properly aligned only on halfword boundaries. This option is incorrect because the SYNCHRONIZED clause does not restrict the alignment to halfword boundaries only.

B. (2) The binary data items will be properly aligned only on fullword boundaries. This option is incorrect because the SYNCHRONIZED clause does not restrict the alignment to fullword boundaries only.

C. (3) The binary data items will be properly aligned only on doubleword boundaries. This option is incorrect because the SYNCHRONIZED clause does not restrict the alignment to doubleword boundaries only.

D. (4) The binary data items will be properly aligned on halfword, fullword, or doubleword boundaries. This option is correct. When the SYNCHRONIZED clause is used with binary data items, it can specify that the data should be aligned on halfword, fullword, or doubleword boundaries, depending on the value specified.

Therefore, the answer is: D.

Find more quizzes: