(*ptr)[2], declare a pointer to an array, named ptr.
for(I = 0; I<2; i++){ ptr = a+I; scanf("%d ",ptr); ptr++; } Enter an integer value in the array. If you enter 1, 2, 3, the storage format is
10
20
30
Sufficient pt r++on the surface; I don't think it's useful. Because at the beginning of each cycle, ptr is newly added. ++has no effect either. At the beginning of each cycle, ptr points to the first address of the I+ 1 line.
for(I = 0; I<3; i++)
{ for(j = 0; j & lt2; j++) printf("%2d ",a[I][j]);
printf(" \ n ");
Outputs the elements in the array, each occupying two positions.
I think you entered 123 with no spaces in the middle, so the system recognizes it as 123 and counts it as a number. You can try adding spaces. For example: 1 2 3 Enter. The output should be
10
20
30