Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created October 7, 2019 00:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/4afa21f8fb7b761ad8d26c0493627b91 to your computer and use it in GitHub Desktop.
Save parzibyte/4afa21f8fb7b761ad8d26c0493627b91 to your computer and use it in GitHub Desktop.
/*
Simple función que intercambia dos variables por referencia.
Más información en:
https://parzibyte.me/blog/2018/09/20/funciones-referencia-valor-c/
*/
void intercambiar(int *a, int *b) {
int temporal = *a;
*a = *b;
*b = temporal;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment