void test(){ char *p = (char *) malloc(100); strcpy(p, "hello"); free(p); p=nullptr; }