i'm learning c pointer , please explain the difference between-->
1.it is c pointer for swaping two numbers #include <stdio.h> void swap (int *num1, int *num2); int main() { int x = 25; int y = 100; printf("x is %d, y is %d\n", x, y); swap(&x, &y); printf("x is %d, y is %d\n", x, y); return 0; } void swap (int *num1, int *num2) { int temp; temp = *num1; *num1 = *num2; *num2 = temp; } 2. why this code will not work--> #include <stdio.h> void swap (int num1, int num2); int main() { int x = 25; int y = 100; printf("x is %d, y is %d\n", x, y); swap(&x, &y); printf("x is %d, y is %d\n", x, y); return 0; } void swap (int *num1, int *num2) { int temp; temp = num1; num1 = num2; num2 = temp; }