Q : What is dangling pointer in C? What is wild pointer in C? Give example?
Dangling Pointer
Dangling or wild is a pointer which does not point
valid object. When a pointer has declared it must be assign a valid
address memory address otherwise it will point some location which is not
valid. These are special cases of memory safety violations.
More generally, dangling references and wild references are references that do not resolve to a valid destination.
Void main()
{
int *pt;
{
int
c=10;
pt=&c;
}
printf("\n\t%d",*pt);
}