#include void swap(int *pa, int *pb) { int t = *pa; *pa = *pb; *pb = t; } int main() { int x = 3, y = 4; int *a, *b; printf("x = %d, y = %d\n", x, y); //swap(&x, &y); // equivalent to the next three lines a = &x; b = &y; swap(a, b); printf("x = %d, y = %d\n", x, y); }