Pointers
#include<stdio.h>
int main(){
int i = 72;
int *j;
j= &i;
int *j= &i;
printf("The address of i %u\n",&i);//address of i through address operator
printf("The address of i %d\n",j);//address of i through var j bcoz it stores the address of i itself
printf("The value of i is %d\n",i);//thevalue of i through printing i
printf("The value of i is %d\n",*(&i));//the value i through the value of memory address of i
printf("The value of i is %d\n",*(j));
}
#include<stdio.h>
int main(){
int i = 72;
int *j;
j= &i;
int *j= &i;
printf("The address of i %u\n",&i);//address of i through address operator
printf("The address of i %d\n",j);//address of i through var j bcoz it stores the address of i itself
printf("The value of i is %d\n",i);//thevalue of i through printing i
printf("The value of i is %d\n",*(&i));//the value i through the value of memory address of i
printf("The value of i is %d\n",*(j));
}
Comments
Post a Comment