// Pantea Aria // pointers recap // Write a program that: // send two variables to a function // swap them // print them in the main #include void swap(int *num1, int *num2); int main() { int num1, num2; printf("Enter two integers:"); scanf("%d %d", &num1, &num2); printf("\nnum1 = %d and num2 = %d before swap", num1, num2); // call swap swap(&num1, &num2); printf("\nnum1 = %d and num2 = %d after swap\n", num1, num2); return 0; } void swap(int *num1, int *num2) { int temp = *num1; *num1 = *num2; *num2 = temp; printf("\nnum1 = %d and num2 = %d in swap", *num1, *num2); }