#include void swap1(int a, int b) { int temp = a; a = b; b = temp; } void swap2(int *a, int *b) { int *temp = a; a = b; b
swap1 will not work because the function just copied the arguments, not affecting the variables in main.
swap1
main
swap2 will not work either.
swap2