Consider the following procedure “add.” Its formal argument X is “call by value,” while the formal argument Y is “call by reference.” After the main program has been executed, what are the values of the variables X and Y in the main program?
|Main program||Procedure "add" (X, Y)|
|X :=2; |
add (X ,Y );
|X :=X +Y ; |
Y :=X +Y ;