I had a question that I was wrong, and I was wondering if anyone could explain this. Do not worry that the class is over, just wanted to find out why this is wrong. I asked several more students, and they had the same answer as mine. I also look at the line, but all the examples I found are the swap functions, which X = 1 bothers me.
SUBROUTINE TEST(X,Y,Z)
X=1
Z=X+Y
RETURN
END
N=2
CALL TEST ( N,N,M)
WHAT WILL M BE IF PASSED BY REFERENCE?
WHAT WILL M BE IF PASSED BY VALUE-RESULT?
I got 3 for the first and 4 for the second question.
source
share