-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b52b74e
commit 359300b
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
//double pointer example | ||
|
||
#include<stdio.h> | ||
|
||
void main() | ||
{ | ||
int x, *p1, **p2; | ||
x = 100; | ||
p1 = &x; /* address of x */ | ||
p2 = &p1; /* address of p1 */ | ||
printf("p1 contains adress of x which is : %u\n",p1); | ||
printf("Address of p1 is : %u\n",&p1); | ||
printf("p2 contains adress of p1 which is : %u\n",p2); | ||
|
||
printf("Value of x is %d",**p2); | ||
} |