Consider the following code:

77 A PIC 99V99 VALUE 55.35
77 B PIC 99V999 VALUE 32.754

ADD B TO A ON SIZE ERROR DISPLAY "ERROR!!!"

What will be the result ?
(a) A=88.10, B=32.754
(b) A=87.00 B=32.754
(c) A=87.10 B=32.754
(d) ERROR!!! will be DISPLAYed on the screen.

Answers were Sorted based on User's Feedback



Consider the following code: 77 A PIC 99V99 VALUE 55.35 77 B PIC 99V999 VALUE 32.754 ..

Answer / milind

The previous answer is wrong.

The correct answer is (a) 88.10.

Is This Answer Correct ?    18 Yes 4 No

Consider the following code: 77 A PIC 99V99 VALUE 55.35 77 B PIC 99V999 VALUE 32.754 ..

Answer / g venkatesh

Answer is D.
as data name length is 9(2).9(2) after the operation
the value will get over flow.
it will routed to on size error display

Is This Answer Correct ?    4 Yes 1 No

Consider the following code: 77 A PIC 99V99 VALUE 55.35 77 B PIC 99V999 VALUE 32.754 ..

Answer / vel

D

Is This Answer Correct ?    3 Yes 6 No

Post New Answer

More COBOL Interview Questions

how to access vsam files in cobol and how to differentiate that this is ESDS file

1 Answers   EDS,


How to remove the spaces at the end of each record in the output file of variable length, via cobol program?

0 Answers  


01 NAME1 PIC X(13) VALUE "COBOL PROGRAMMING". 01 NAME2 PIC X(13). now I want to display the value of NAME1 in reverse order i.e value should be displayed as "GNIMMARGORP LOBOC" HOW can I do that ??? please let me know if any one knows it.

11 Answers   FirstApex, NIIT,


how can we apply for HSBC exam(Mainframe) in India??? i went to their site and was told to submit my CV ,. etc..( totally confusing...)

0 Answers   HSBC, Quest,


how do you reference the ksds vsam file formats from cobol programs

0 Answers  






how we rectify soc4 and soc7 error in project(need real time answer)? please reply

3 Answers   HCL, Wipro,


How To move a value to an array using move verb?

3 Answers   IBM,


What is the difference between Structured COBOL Programming and Object Oriented COBOL ?

1 Answers  


What is the difference between SEARCH and SEARCH ALL? What is more efficient?

9 Answers   IBM, iFlex, Wipro,


How to find out the closest prime number of an input number? I believe it has something to do with SEARCH and COBOL Linear Array.

0 Answers   Infosys,


In the JCL, how do you define the files referred to in a subroutine ?

2 Answers  


How can you submit a job from COBOL programs?

2 Answers   ITC Infotech,


Categories