problem in c..
int s[][2]={12,1,13,214,3};
int i,j;
int (*p)[2];
int *pint;
For(i=0;i<3;++i)
{
p=&s;
pint=(int*)p;
for(j=0;j<2;++j)
printf("%d",*(pint+j));
}
This will print values stored in array s.
But in printf statement instead of *(pint+j) if use *(*p+j). Both will print values of s.
How *(pint+j)=*(*p+j)??
Can anyone explain it..?
int i,j;
int (*p)[2];
int *pint;
For(i=0;i<3;++i)
{
p=&s;
pint=(int*)p;
for(j=0;j<2;++j)
printf("%d",*(pint+j));
}
This will print values stored in array s.
But in printf statement instead of *(pint+j) if use *(*p+j). Both will print values of s.
How *(pint+j)=*(*p+j)??
Can anyone explain it..?
0