home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / prof_c / 11screen / swap_int.c < prev   
Encoding:
Text File  |  1988-08-11  |  218 b   |  17 lines

  1. /*  
  2.  *    swap_int -- exchange the values of the two integers
  3.  */
  4.  
  5. void
  6. swap_int(p1, p2)
  7. register int *p1;
  8. register int *p2;
  9. {
  10.     int tmp;
  11.  
  12.     /* exchange the values */
  13.     tmp = *p1;
  14.     *p1 = *p2;
  15.     *p2 = tmp;
  16. }
  17.