All pastes #534120 Raw Edit

Miscellany

public c v1 · immutable
·published 2007-06-03 17:49 UTC
rendered paste body
#include <stdio.h>#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;}