int (*ptr)[4] = a; // here ptr is a pointer to an array of 4 integers.
At first ptr is pointing to first row. Say address of $1$st row is $1000.$
So, (*ptr)[0] = *(1000 + 0*4) = *(1000) = 0 and (*ptr)[1] = *(1000 + 1*4) = *(1004) = 1
Now ++ptr
is updating pointer to next row (increment will be the sizeof (*ptr) which here is an integer array of size 4). So, Now ptr is pointing to address $1000+4*4 = 1016$
So, Now (*ptr)[0] = *(1016 + 0*4) = *(1016) = 4
and (*ptr)[1] = *(1016 + 1*4) = *(1020) = 5
So, the correct answer is $(B).$