code to explanationFri, 06 Jan 2023
int A[10]; int *B[10]; for (int *p = A; p != A+10; p++) B[p-A] = p;
This code creates an array of 10 ints and an array of 10 pointers to ints. It then sets each of the pointers in B to point to the corresponding element of A.