// // intro_pointers.c // // // Created by Bibhas Ghoshal on 20/02/21. // #include int main() { int x =420; int *p; // p has type int // printf("values of x = %d\n",x); printf("Uninitialized value of pointer p = %p\n",p); p = &x; // p stores address of x // printf("Initialized value of pointer p = %p\n",p); printf("Value at address pointed to by pointer p = %d\n",*p); printf("Uninitialized value of pointer p = %d\n",*p); printf("This is the same value as x:%d\n",x); *p = 840; // Same as x= 840;// printf(" New value of x:%d\n",x); return 0; }