What is the output of the following code?

1.8 What is the output of the following code?
main()
{ int a=1, b=10;
swap(a, b);
printf(“\n %d %d”, a, b);
}
swap(int x, int y)
{ int temp;
temp = x;
x = y;
y = temp;
}
A) 1 1
B) 1 10
C) 10 1
D) None of the above


Leave a Reply