I have this code trying out pointer with integers and there is a warning of initialization makes pointer from integer without a cast while compiling it. Also, it seems that after compilation the .exe file will not run properly. Please help!
#include <stdio.h>
#include <stdlib.h>
int
main(int argc, char* argv[]) {
int num1=10, *num2=1;
printf("num1=%d \t num2=%d \n", num1, *num2);
*num2 = num1;
printf("num1=%d \t num2=%d \n", num1, *num2);
return 0;
}