Consider the following code segment

void foo(int x, int y)

{

x+ = y;

y+ = x;

}

main ()

{

int x = 5.5;

foo(x, x);

}

What is the final value of x in both call by value and call by reference, respectively?

1
5 and 16
2
5 and 12
3
5 and 20
4
12 and 20
5
Question Not Attempted

Sponsored

hivanix.in

Visit

This quiz is brought to you by hivanix.in

🌐 Web App Development

Quick Navigation