Guest User

Untitled

a guest
Jun 18th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. #include<stdio.h>
  2. void cambiar(int *a, int *b);
  3.  
  4. int main ()
  5. {
  6. int p;
  7. int q;
  8. int *p,*q;
  9. int x,y;
  10.  
  11. p = &x;
  12. q = &y;
  13.  
  14. cambiar(p,q);
  15.  
  16. system ("PAUSE");
  17. return 0;
  18. }
  19.  
  20. void cambiar(int *a, int *b)
  21. {
  22.  
  23. int aux = *p;
  24.  
  25. *p = *q;
  26. *q = aux;
  27. }
Add Comment
Please, Sign In to add comment