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 / sudeshna majumdar
Correct answer is c) 30.
The para1 will be performed 6 times where the values of I
will be 10, 8, 6, 4, 2, and 0 respectively.
After each processing of para1, value of J will be
incremented by 5 and value of I will be decremented by 2.
Now, the para1 is called starting from I = 10 and ends when
I = 0. Thus, after 6 time para1 processing,J value will be
5*6 = 30.
| Is This Answer Correct ? | 10 Yes | 4 No |
Post New Answer View All Answers
What is the use of intialize verb?
) How do u handle errors in BMS macro
what is the difference between COBOL2 AND COBOL390?
i want a program using by if, evaluate , string, unstring, perform, occurs?
Differentiate cobol and cobol-ii. (Most of our programs are written in cobolii, so, it is good to know, how, this is different from cobol)?
which is Best IBM Mainframe Training and Placement Institute in Ameerpet Hyderabad
How do define dynamic array in cobol.
How to remove 2 duplicate records and copy only one using job control language?
Write a program to explain size error.
How you can read the file from bottom?
How arrays can be defined in COBOL?
Define static linking and dynamic linking.
What are the cobol coding sheets?
HOw can I get the negative sign while deduct high value from low value
How to change size of Initial number of records to *NOMAX for ALL PF files from perticular library, how can I do that