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

how many bytes do SPPPP999 will store?

18 Answers  


What is the difference between write & move in COBOL?

3 Answers   CSC, HHB,


How to print 10 to 1 if the input have only 10 digit number?

0 Answers  


How can we know that cobol program is using report file or simple file....?

4 Answers  


What is an in-line perform ?

4 Answers   Accenture,






Difference between cobol and cobol-ii?

0 Answers  


What is the difference between NEXT SENTENCE and CONTINUE?

2 Answers   Mphasis,


If my file contains 100,000 records and job abended at 55,000th records processing then how can i restart job from that record onward by ignoring that record. I can not edit the file as file size is big and it is getting browse substituted?

5 Answers   TCS,


When can the USING phrase be included in the call statement ?

2 Answers  


In file1 have 80 records are like d1,d2,d3......D80. File2 have 1000records are like a1d1,a1d2,a3d3.....Etc. I want matching records in file3 ? Plse tell me the matching logic???I want answer only in cobol ?Not using any tool or jcl?

1 Answers   CSC,


What is a scope terminator? Give examples.

2 Answers  


How do you compile cobol program..?

1 Answers  


Categories