What is the size of W-REC in the following 01 W-REC 05 A PIC 9(4)V99 05 B READLINES A 10 C PIC XX 10 D PIC S9(4) 05 E OCCURS 7 PIC ZZ.ZZ 05 F OCCURS 5 10 G PIC ZZ.ZZZ99 10 H OCCURS 3 15 J PIC 9(3) 15 K PIC V99 a.177 b.161 c.180 d.none of yhe above

This question is related to TCS Interview

Showing Answers 1 - 1 of 1 Answers

Ans is b ie 161.

Explanation is :  

01 W-REC
05 A PIC 9(4)V99
05 B READLINES A
10 C PIC XX
10 D PIC S9(4)

As B redefines A so they will occupy the same memory of size : 6


05 E OCCURS 7 PIC ZZ.ZZ

This will occupy : 5 * 7 = 35 bytes

05 F OCCURS 5
10 G PIC ZZ.ZZZ99
10 H OCCURS 3
     15 J PIC 9(3)
     15 K PIC V99

This will occupy : 5 * (9+ 3*5) = 120  bytes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions