A simple program is:
Now my understanding is a 2 dimensional array is nothing but a collection of one dimensional array within another one dimensional array.So when i am pointing n,the address is held in ptr like n..
printf("%d",*(ptr+i)); //should print 2,6 and 3 as n,n and n
So ptr[i] should=ptr,ptr,etc which is invalid as it is not pointing to any particular element like ptr or ptr.So how the output is printed?
Help me in correcting the concept!!
I also know we can access each element of such array if we have already initialised a pointer to an array.But here nothig is done like that!!