diff options
Diffstat (limited to 'swap.c')
-rw-r--r-- | swap.c | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -0,0 +1,17 @@ +static inline void swap(int *a, int *b) +{ + int tmp = *a; + *a = *b; + *b = tmp; +} + +int main(int argc, char **argv) +{ + int i; + for (i = 0; i < 999999999; i++) { + int a = 2; + int b = 123; + swap(&a, &b); + } + return 0; +} |