Question: VII. Consider the following code: int a; procedure foo (int x) { x = x + 10; a = a + X; } procedure
VII. Consider the following code: int a; procedure foo (int x) { x = x + 10; a = a + X; } procedure fie() { a = 5; foo (a); print (a); } For each of the following parameter passing methods, show what would be printed by a call to fie. A. B. C. Call by value Call by value-result Call by reference
Step by Step Solution
3.32 Rating (158 Votes )
There are 3 Steps involved in it
The code defines two procedures foo and fie The foo procedure takes an integer parameter x and adds it to a global variable a It then adds 10 to x The fie procedure prints the value of a sets a to 5 a... View full answer
Get step-by-step solutions from verified subject matter experts
