From 359300b9403fd8f7d4493ac8c53fe2bb001b9eb5 Mon Sep 17 00:00:00 2001 From: adithyaanilkumar Date: Mon, 29 Jun 2020 09:45:40 +0530 Subject: [PATCH] added uninon --- C/double_pointer.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 C/double_pointer.c diff --git a/C/double_pointer.c b/C/double_pointer.c new file mode 100644 index 0000000..0ce8b32 --- /dev/null +++ b/C/double_pointer.c @@ -0,0 +1,16 @@ +//double pointer example + +#include + +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); +} \ No newline at end of file