this gives error, since its a 2D array .but arr gives the base address when printed out .If i use *(&arr[0][0]+1) instead of *(arr+1) i dont get errors,where am i wrong
You get the error on the second tests because it is a 2 dimension array (let's not argue here about whether arrays have diemnsions).
therefore EACHelement of the first ddimension contains an array of 3 integers.
So in the second example the result of *(arr+1) is int array[3] so *(arr+1) = 5; is saying int [3] =5 which is incorrect.
so arr[1][0]=5 using pointers would be **(arr+1) = 5;