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.
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.
I want more information about types of pointers and apart from more complexity y we use pointers
ReplyDelete