What is wild pointer?

Questions by pbchaudhari   answers by pbchaudhari

Showing Answers 1 - 18 of 18 Answers

Farhanaaz

  • Aug 27th, 2007
 

Wild pointers are also known as Dangling pointers. Pointers that do not point to a valid object of the appropriate type, or to a distinguished null pointers value in language which support this.

  Was this answer useful?  Yes

A dangling pointer is a pointer to storage that is no longer allocated

These examples can further clarify the point

{
char *cp = NULL;
/* ... */
{
char c;
cp = &c;
} /* c falls out of scope */
/* cp is now a dangling pointer */
}


{
char *cp = malloc ( A_CONST );
/* ... */
free ( cp ); /* cp now becomes a dangling pointer */
cp = NULL; /* cp is no longer dangling */
/* ... */
}

  Was this answer useful?  Yes

Deepali Padval

  • Aug 22nd, 2011
 

Wild pointer is a pointer which has not been initialized.
i.e.
It has not have any address assigned to it.
e.g.

Code
  1. int function1()

  2. {

  3.      int a=5;  

  4.      int *b;       // wild pointer(uninitialized)

  5.      printf("value of a=%d",a);

  6. }

  Was this answer useful?  Yes

wild pointer

  • Aug 24th, 2011
 

Wild pointer is a pointer that doesn’t point to either a valid object (of the indicated type, if applicable), or to a distinguished null value, if applicable.

  Was this answer useful?  Yes

sunil

  • Feb 20th, 2013
 

A pointer which does not hold any valid address is called wild pointer

  Was this answer useful?  Yes

chandu

  • Apr 5th, 2013
 

wild pointer is a pointer which has not been initialized i.e point to nothing

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions