The following code,according to me should run successfully,but fails at runtime.I don\'t get the reason:
void main()
{
int arr[5][3]={1,2,3,4,5,6,7,8,9,10,1
int **p=&m;
p points to address, where m is placed:
... | m | sth | ... | p | ...
^ V
|_________________|
Now, increment it:
... | m | sth | ... | p | ...
^ V
|___________|
So, now p points to sth. What is sth? Nobody knows. But you're trying to get access to the address sth contains. This is undefined behavior.