Main content: two-dimensional arrays and pointers, &*a[i][0] understanding, arrays 1[e] and e[1]
#include <stdio.h> #define NUM_ROWS 10#define num_cols 10int Main (int argc, char **argv) { int a[nu M_rows][num_cols], *p, i = 0; A is interpreted as a pointer to an integer pointer that is int * * int C, d=2,*test, e[2] = {4,5},f[2][2] = {{11,22},{33,44}}; e understood as int * test = &d;// c = *&test; As with & (*test) results, * and & same priority, right-to-left c = &*test; Attention and ++*test difference, here is a bit not understand, why & (*test) not error, I //sense is *test equivalent to D, not a specific value, and then & (*test) equals & (d) //So it is confirmed that the following pointer operation & and * can be canceled// c = ++*test; printf ("1[e] =%d\n", 1[e]); 1[e] and e[1], as for the compiler e[1] equivalent to * (E + 1) ==>* (1 + E) & Nbsp; //is equivalent to 1[e], but good programming habits do not write this printf ("c =%d\n", c); printf (" D is the address =%d\n ", &d);// test = &*e[0]; //This error (*&e[0] compile through but run error), the pointer can be & and * Cancel, e[0] is constant, //below f[1] indicates the second row// printf ("constant d =%d\n", *test); test = & *f[1]; printf ("D =%d\n", *test); for (i = 0; i < num_rows; i++) { /* causes p to point to a row in a two-dimensional array with P = &a[i][0] equivalent to P = a[i] * Two-dimensional arrays in C language storage by row * The magic formula between array subscript and pointer arithmetic operations * for any array a , A[i] equivalent to * (a+1) . * because & and * can be canceled, then &a[i][0] equivalent to & (* (a[i]+0)) ==> equivalent to &*a[i] ==>a[i] */&Nbsp; for (p = a[i]; p < a[i] + num_cols; p++) {  ; *p = i; printf ("%3d", *p); } printf ("\ n"); } return 0;}
Output:
Program Ape--c Language Details 13 (two-dimensional array and pointers, &*a[i][0] understanding, array 1[e] and e[1] you probably haven't seen it.