Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
#include <stdio.h>
void swap(int* a, int* b)
int tmp = *a;
*a = *b;
*b = tmp;
int main(void)
int a = 10;
int b = 20;
swap(&a, &b);
printf("%d %d\n", a, b);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment