study the following
01 A PIC 99V0 VALUE 5
01 B PIC 9V9 VALUE 6
01 C PIC 99V9 VALUE 2.5
01 D PIC 99 VALUE 3
COMPUTE A ROUNDED B C = A+B*C/D
ON SIZE ERROR PERFORM PRINT-ERROR
the comments of A.B.C after execution of the above
statement are
a.A=10 B=0 C=10
b.A=10 B=9.9 C=9.9
c.A=10 B=0 C=9.9
d.A=10 B=6 C=10

Answers were Sorted based on User's Feedback



study the following 01 A PIC 99V0 VALUE 5 01 B PIC 9V9 VALUE 6 01 C PIC 99V9 V..

Answer / kamesh

5+6*2.5 div 3=10 so a=10,b=0 bcz truncated 1.and c= 10.

Is This Answer Correct ?    8 Yes 2 No

study the following 01 A PIC 99V0 VALUE 5 01 B PIC 9V9 VALUE 6 01 C PIC 99V9 V..

Answer / karthik

IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO-WORLD.
DATA division.
WORKING-STORAGE SECTION.
01 A PIC 99V9 VALUE 5.
01 B PIC 99V9 VALUE 6.
01 C PIC 99V9 VALUE 2.5.
01 D PIC 99 VALUE 3.
PROCEDURE DIVISION.
COMPUTE A ROUNDED B C = A+B*C/D
ON SIZE ERROR PERFORM PRINT-ERROR.
DISPLAY A.
DISPLAY B.
DISPLAY C.

STOP RUN.

PRINT-ERROR.
DISPLAY "ERROR".


o/p
10.0
10.0
10.0

Is This Answer Correct ?    2 Yes 0 No

study the following 01 A PIC 99V0 VALUE 5 01 B PIC 9V9 VALUE 6 01 C PIC 99V9 V..

Answer / dimpy19

10A
6 B
10C

Is This Answer Correct ?    0 Yes 0 No

study the following 01 A PIC 99V0 VALUE 5 01 B PIC 9V9 VALUE 6 01 C PIC 99V9 V..

Answer / dsfd

a=10,b=6 and c= 10

Is This Answer Correct ?    2 Yes 3 No

Post New Answer

More COBOL Interview Questions

what is a zoned decimal data type and how it will be stored?

2 Answers   IBM,


2)Where the Plan is located in CICS-DB2?

1 Answers   IBM,


How to read records from flat file in reverse order through COBOL program?

14 Answers   Accenture, Broadridge, IBM, MAT, Polaris, SPIC, Syntel, TCS, Wipro,


1.Can we define condition-name conditions in FD entry.

11 Answers  


How do get the result of your program directly on your pc?

0 Answers   UST,






diffrence between z(2) and z9(2)

4 Answers   Cap Gemini,


i WANT ALL ERROR codes IN CICS and DB2

2 Answers  


Can you please let me know the centre name of INS certification in Kolkata.

0 Answers  


What is the default value of DISP for temp datasets

5 Answers   IBM,


wht is packed decimal in cobol

2 Answers  


What is the difference between perform … with test after and perform … with test before?

0 Answers  


2 input fles: 2 flat files, with different number of records. both are having unique key for each record and already sorted in ascending order . match these files using unique key and in output only matching key value has to be written. please procide cobol logic

0 Answers  


Categories