#include #define swap(a, b) swap_( (void **) &(a), (void **) &(b) ) void swap_(void** a, void** b) { void* temp = *a; *a = *b; *b = temp; } int main(void) { int a = 5, b = 10; printf("%d %d\n", a, b); swap(a, b); printf("%d %d\n", a, b); return 0; }