given the following:
77 A PIC 9V9 VALUE 9.5
77 B PIC 9 VALUE 9.
77 C PIC V9 VALUE 0.8
77 D PIC 9
77 E PIC 9
77 F PIC 9V999
what are the contenta of D E nad F after the following
statements are
executed:
COMPUTE F ROUNDED=A+C/B
MULTIPLY A BY C GIVING E
ADD B C A GIVING D ROUNDED
a.F=9.589 E=8 D=1
b.F=9.589 E=8 D=9
c.F=9.589 E=7 D=9
d.F=9.589 E=7 D=1
Answer Posted / ram g [mind tree]
c is the correct answer ...
the result will be like this
f = 9589
e = 7
d = 9
bcoz num truncation will happen in left.
for eg: if you try to store 123 in 01 x pic 9.
the value of x should 3 not 1.
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
What are the different data types in cobol?
Whats the difference between search & search ALL?
What is rmode(any) ?
Why did you choose to work with ibm mainframe cobol programming?
i made it to stage 3 of an interview process wednessday they will quiz my knowledge again face to face for an analyst role recruiter said it will be based on Business requirements system is cobol and good ideas what they might ask etc
What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?
Have you used the sort in your project?for this type of questions any working on real time project give the eg. with real time scenario.
how do you reference the fixed unblock file formats from cobol programs
What is redefines clause in COBOL?
Differentiate between structured cobol programming and object-oriented cobol programming.
What is the LINKAGE SECTION used in COBOL?
What is a report item?
When is inspect verb is used in cobol?
How do you reference the fixed block file formats from cobol programs
What happens when we move a comp-3 field to an edited (say z (9). Zz-)?