What happens when **pointer is used in c program ?
What is pointer : In C pointer is a variable that stores the address of another variable. In other word A pointer is a variable that refers to to address of a value.
Syntax : Data_type *ptr
The above syntax tells that ptr is a pointer variable and it holds the address number of a given data type.
Example :
What is **pointer : The **pointer is read as double pointer or pointer to pointer. In case of pointer to pointer concept , the pointer to pointer contains the address of a first pointer.
In the above code ptr is hold the address of I variable and pointer to pointer(pptr) it holds the address of the ptr variable.
Note : ‘ * ’ is not holds the address of a variable , it holds the value of the variable and ‘ & ’ holds the address of a variable.
Comments
Post a Comment