int main()
{
static int x[]={100,200,300,400,500};
static int *p={x+2,x,x+3,x+4,x+1};
int **ptr=p;
ptr++;
printf("%d",*ptr);
return 0;
}
can anyone please explain why is the output 500, initially ptr contains x+2, after incrementation, it should contain x and the output should be 100, but the output is 500. I don't know why! A lot of guys are concerned about the warning and norms of C , the thing is this is a textbook question and i need to find the output ,and how i got the output Any help is appreciated!!