here is a code
#include<stdio.h>
int main(void)
{
int b[10][5] ;
int (*q)[10][5] = &b ;
printf("%d", (char*)(q+1) -(char*)q);
}
the output it produces is 200 while if I change the typecast to (int *)(q+1)-(int *)q, the output is 50. I know that q is a pointer to the 2D array b. So q+1 is address immediately after the 50 elements but how does the type casting affects the output. Please explain in detail.