Question PRG-C-0018
HardWhat is the output of this program?
#include <stdio.h>
void swap(int a, int b) {
int t = a;
a = b;
b = t;
}
int main(void) {
int x = 1, y = 2;
swap(x, y);
printf("%d %d", x, y);
return 0;
}
- A.
2 1
- B.
1 2
- C.
Sign up free to see the answer and a step-by-step explanation.