Simple c program of pointer in c programming
#include<stdio.h>
int main()
{
int x=10;
int*p;
p=&x;
printf("%d\n",x);//value of variable
printf("%d\n",*p);//value at address
printf("%x\n",&x);//address of x(output come in hexa decimal due to x)
printf("%d\n",p);//address at value
return 0;
}
output:
10
10
61fec8
6422216
[Finished in 1.12s]