m2skills

swap4

Mar 29th, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.16 KB | None | 0 0
  1. // method that swaps numbers using temp variables
  2. void swap4(int *num1, int *num2){
  3.     int temp;
  4.     temp = *num1;
  5.     *num1 = *num2;
  6.     *num2 = temp;
  7.    
  8.     return;
  9. }
Add Comment
Please, Sign In to add comment