so i started learning about pointers today. I was doing a simple example but whenever i run the codes there is a pop up window saying "if.exe has stopped working" and then it says "a problem caused the program to stop working correctly. windows will close the program and notify you if a solution is available." then i close the pop up window and my program ends without doing anything. the message on program says something like this "process returned 255<0xFF> execution time :178.950s press any key to continue." what is wrong? Thank you for helping me out.
Code:#include <stdio.h> #include <stdlib.h> int main() { int *p,a=2; *p=&a; printf("%d",*p); return 0; }