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 / gayathri
The para1 will be performed only 5 times for the values of
I = 10, 8, 6, 4, and 2 respectively. Para1 can not be
executed for the value I = 0 as it uses Perform until
condition.
so the value of J is 5+(5*5) equals 30
correct answer is c) 30
Please correct me if I am wrong.
| Is This Answer Correct ? | 13 Yes | 1 No |
Post New Answer View All Answers
how do you reference the fixed unblock file formats from cobol programs
Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?
If you are current on the owner of a set, what is the difference between obtain next and obtain first?
How to get the last record in vsam file in cluster? And how can you get the ksds file records into cobol program?
Can we change the password using ALTER? anyone tried and changed?
how we sort two input files based on a common column and giving one o/p file please send me the coding logic?
What is the utilization of copybook in cobol?
What is the LINKAGE SECTION used in COBOL?
IF I mention stop run in CICS what happens?
What are the different rules to perform a Search?
Write the code to count the sum of n natural numbers.
What are literals?
What are the different types of condition in cobol and write their forms.
Define static linking and dynamic linking.
How many bytes S(8) comp field occupy and its maximum value?