Move Zeroes to I
move 5 to j
perform para1 varying I from 10 by -2 until I = 0
display j.
para1.
Add 5 to j.
What’ll be the value after execution of display stmt.
A) 35
B) 40
C) 30
D) 25
please explain how?
Answer Posted / avi
The value of J before the Para call is 5.
Now,the loop executes for 6 times, so 5*6 is added to the
existing value of J.
J=5+(5*6)
=35.
The correct option is 35.
| Is This Answer Correct ? | 7 Yes | 12 No |
Post New Answer View All Answers
What is the difference between structured cobol programming and object alternativelyiented cobol programming?
A table has two indexes defined. Which one will be used by the SEARCH?
how do you reference the fixed unblock file formats from cobol programs
Write the code to count the sum of n natural numbers.
What are the various section in data division and briefly explain them.
What is the default value(s) for an initialize and what keyword allows for an override of the default?
Why is it necessary that file needs to be opened in I-O mode for REWRITE?
How can you get the ksds file records into your cobol program?
what are decleratives in cobol?
what is difference between cobol and cobol/400
What is cobol?
Have you used comp and comp-3 in your project? And how?
How you can characterize tables in cobol?
What is the LINKAGE SECTION used in COBOL?
Difference between array and sub-script ?