Right Click to Search

Sunday, January 10, 2025

Pointer to Pointer in C Programming


Pointer to Pointer in C Programming


Declaration :
int  **ptr2ptr ;      // Double Pointer

Consider the Following Example :
int n = 45 , *ptr , **ptr2ptr ;
ptr = &n;
ptr2ptr = &ptr;

What is Pointer to Pointer ?
  1. Double (**)  is used to denote the double Pointer
  2. Pointer Stores the address of the Variable
  3. Double Pointer Stores the address of the Pointer Variable

 


Statement
What will be the Output ?
*ptr
45
**ptr2ptr
45
ptr
&n
ptr2ptr
&ptr

Notes :
  1. Conceptually we can have Triple ..... n pointers 
  2. Example : *****n,****b can be another example

Pointer Home

Bookmark & Share

Tags / Keywords : |

Stumble
Delicious
Technorati
Twitter
Facebook

0 Comments:

Post a Comment

Your Feedback :This is Growing Site and Your Feedback is important for Us to improve the Site performance & Quality of Content.Feel Free to contact and Please Provide Name & Contact Email

 

Learn C Programming Copyright © 2010 LKart Theme is Designed by Lasantha, Free Blogger Templates