Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created May 16, 2020 06:28
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/a8aba0fbbd8bce3ec6c62a248c0f23b2 to your computer and use it in GitHub Desktop.
Save parzibyte/a8aba0fbbd8bce3ec6c62a248c0f23b2 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