C
Chathu
Hi everyone!..
I'm back and sorry for these idotic questions.
I need help on understanding the following program. When I run it I
got the answer 2 5, but I can't understand how it is happenning. Can
anybody help me on this.....
#include<stdio.h>
int main()
{
int a[][3] = { 1,2,3 ,4,5,6};
int (*ptr)[3] =a;
printf("%d %d " ,(*ptr)[1], (*ptr)[2] );
++ptr;
printf("%d %d" ,(*ptr)[1], (*ptr)[2] );
return(0);
}
I'm back and sorry for these idotic questions.
I need help on understanding the following program. When I run it I
got the answer 2 5, but I can't understand how it is happenning. Can
anybody help me on this.....
#include<stdio.h>
int main()
{
int a[][3] = { 1,2,3 ,4,5,6};
int (*ptr)[3] =a;
printf("%d %d " ,(*ptr)[1], (*ptr)[2] );
++ptr;
printf("%d %d" ,(*ptr)[1], (*ptr)[2] );
return(0);
}