#include#include using namespace std; int main() { int *p = NULL; p = (int*)malloc(sizeof(int)); *p = 4; free(p); printf("%d\n",p); if(p != NULL) { printf("%d\n",*p); } return 0; }
#include#include using namespace std; int main() { int *p = NULL; p = (int*)malloc(sizeof(int)); *p = 4; free(p); printf("%d\n",p); if(p != NULL) { printf("%d\n",*p); } return 0; }