#include<stdio.h> int main(){ int s=2,*r=&s,**q=&r,***p=&q; printf("%d",p[0][0][0]); return 0; }
Please provide the explanation of the answer also.
Output: 2
As we know p[i] =*(p+i) So, P[0][0][0]=*(p[0][0]+0)=**p[0]=***p Another rule is: *&i=i So, ***p=*** (&q) =**q=** (&r) =*r=*(&s) =s=2
void main(){ int i=320; char *ptr=(char *)&i; printf("%d",*ptr); }
Please provide your explanation also?