void change(int *x,int * y){ int z; z = * x; * x = * y; * y = z; printf("%d,%d\n ",*x,* y); }
Is to exchange the values of *x and *y variables, and then print the exchanged two values.
To exchange the values of two int variables A and B in a program, use change (&; I. & AMPB); Realize. The exchange result realized in the change function can also be reserved for variables A and B in the main tone function.