Value of the varaible depending on static or dynamic call in COBOL.
Posted: Mon Sep 12, 2016 2:44 pm
Hi,
Program-A CALLs another Program-B statically. Program-B has variable B1 defined as
B1=0
B1=B1+1
After 4th CALL what is the value of the B1?
If the Program-B was CALLed dynemically, what will be the value of B1?
I said, it will be 4 in both the cases. But I was told I am wrong. Interviewer refused to explain why I am wrong. Can anyone onf you please share your thoughts on the answer for the question.
Program-A CALLs another Program-B statically. Program-B has variable B1 defined as
B1=0
B1=B1+1
After 4th CALL what is the value of the B1?
If the Program-B was CALLed dynemically, what will be the value of B1?
I said, it will be 4 in both the cases. But I was told I am wrong. Interviewer refused to explain why I am wrong. Can anyone onf you please share your thoughts on the answer for the question.