Listing 7 A swap function that doesn't

/* swap1.c: A *BOGUS* swap function */
#include <stdio.h>

void swap(int, int);

main()
{
   int i = 7, j = 8;

   swap(i,j);
   printf("i == %d, j == %d\n",i,j);
   return 0;
}

void swap(int x, int y)
{
   int temp = x;
   x = y;
   y = temp;
}

/* OUTPUT:
 * i == 7, j == 8 */

/* End of File */