Give the output of the program using Call-By-Reference:
int i, a[3];
void f (int x, int y){
x = (x*y) mod 3; y = y – x;
}
main(){
i = 0;
a[0] = 1;
a[1] = 2;
a[2] = 0;
f(i, a[i]);
print(“%d %d %d %d\n”, i, a[0], a[1], a[2]); f(a[i], a[i]);
print(“%d %d %d\n”, a[0], a[1], a[2]);
}
Get Answers For Free
Most questions answered within 1 hours.