what is dangaling pointers?
pointers
Collapse
X
-
Originally posted by sowmythint *p;
int *p=0;
int *p=NULL;
These are effectively all uninitialise pointers but if you set the uninitialised pointer to o (or NULL) then you can at least detect it.
Before writing to the pointer you must initialise it
Code:p = malloc(sizeof *p);
Comment
Comment