Runtime Environments & Parameter Passing


Answer & solution
Answer: B (no official key was published)
1. Initially ia=3 and ib=8; the expression ib+5 evaluates to 13. Under the stated expression-to-temporary reference model, the compiler passes the address of a temporary containing 13, not the address of ib. swap sets ia to 13 and the temporary to 3; ib remains 8.
2. S1 and S4 hold, so B. This is the pedagogical model specified by the options, not a guarantee that every actual FORTRAN standard/compiler permits defining an expression-associated dummy argument.
3. Teaching check: The expression ib+5 has a value but is not the storage cell ib. Passing a temporary permits swap to overwrite the argument without overwriting ib. Trace the two addressed cells separately: ia changes 3→13, temporary changes 13→3, and ib stays 8.