problem in c program..

Below program is to print the values of 2d array s.

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 .
In the above program in printf statement we use *(pint+j) which prints value.
But if *(*p+j) is use instead of *(pint+j), then also program remains same.
Is this means pint=*p ??
How *(*p+j) works same as *(pint+j)??
Can anyone explain..?

Replies

You are reading an archived discussion.

Related Posts

Toppr, a Mumbai based online exam preparation platform backed by SAIF Partners and Helion Ventures, was founded by Zishaan Hayath and Hemanth Goteti. Prior to starting up with Toppr, Zishaan...
This link was sent to me by a friend in Google HQ. Rather a long speech. Did not make much sense to me. However it might point to the shape...
Quote: A relatively new type of robot is making its way into the industrial automation and electronics manufacturing sectors. Often referred to as micro-robots, these devices are as small as...
Quote: Before the average onshore wind turbine produces a single watt, more than 100 tons of structure, several million dollars in capital investment and a suitable site all have to...
Lenovo India has silently pushed its new Android tablet in the Indian market with Lenovo A8-50, an 8-inch Android device that features voice-calling. Running on the slightly older Android 4.2...