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?

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? Correct Answer 5 and 20

Related Questions

Comment on the following 2 C programs.
#include  //Program 1int main(){ int a; int b; int c;}#include  //Program 2int main(){ int a; { int b; } { int c; }}