/* * swap.c -- A modular program that swaps 2 numbers. */ #include void swap (int *, int *); main() { int input1, input2; printf ("Enter first integer: "); scanf ("%d", &input1); printf ("Enter second integer: "); scanf ("%d", &input2); swap (&input1, &input2); printf ("The swapped values are %d and %d.\n", input1, input2); } void swap(int *x, int *y) { int temp; temp = *x; *x = *y; *y = temp; }