Search This Blog

Friday, April 18, 2014

What is dereferencing of a pointer?

Dereference operation means indirect operation. In pointers, pointer variable holds the address of similar kind of variable.
      Ex- int *p;
           'p' is a pointer to integer which holding the address of variable
     int i=10;
         when we want to retrieve value pointed by pointer variable 'p', We use *p to get the value so in this case we are not directly accessing the value of i, but we are indirectly accessing through pointer means dereferencing the pointer.  
      

1 comment:

  1. I want more information about types of pointers and apart from more complexity y we use pointers

    ReplyDelete