Question 80

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 andcall by reference, respectively?


Create a FREE account and get:

  • Download Maths Shortcuts PDF
  • Get 300+ previous papers with solutions PDF
  • 500+ Online Tests for Free

cracku

Boost your Prep!

Download App