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

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

1 Expert Approved Answer
Step: 1 Unlock

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

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!