pointers and pointer to pointer

 #include <stdio.h>



int main(){
int i=60;
int *j=&i;
int **k=&j;
printf("The value of i is:%d\n",i);
printf("The value of i is:%d\n",*j);
printf("The address of i is:%u\n",&i);
printf("The address of i is:%u\n",j);
printf("The address of j is:%u\n",&j);
printf("The value of j is:%u\n",*(&j));
printf("The value of j is:%u\n",*k);
printf("The address of j is:%u\n",k);
printf("The value of k is:%u\n",*(&k));

 return 0;
}

Comments

Popular posts from this blog

snake game Version-2 (using random number)

allocating dynamic memory using calloc

store a table in dynamic array and then change the size of array dynamically to store more numbers