Home

A program to explain POINTERS to POINTERS

C Programming Language 111

Program

#include <stdio.h>

void main()
{
    int a = 10, *p, **pp;
    p = &a;
    pp = &p; // (OR) // *pp = p;

    printf("&a = %u,\ta = %d\n", &a, a);
    printf("*p = %d\n", *p);
    printf("**pp = %d\n", **pp);
    printf("&p = %u,\t*pp = %u\n", &p, *pp);

    printf("\n");
}

Result

&a = 2226067540,        a = 10
*p = 10
**pp = 10
&p = 2226067544,        *pp = 2226067540


Last Updated on

Next Post: Rules vs Guidelines →

Comments