fork download
  1. #include <stdio.h>
  2. int main(void)
  3. {
  4. int x[2][3] =
  5. {
  6. {4, 5, 2},
  7. {7, 6, 9}
  8. };
  9. int (*p)[3] = &x[1];
  10. int (*q)[3] = x;
  11. printf("%d %d %d\n", (*p)[0], (*p)[1], (*p)[2]); //4, 5, 2
  12. printf("%d %d\n", *q[0], *q[1]); // 4, 7
  13. return 0;
  14. }
  15.  
Success #stdin #stdout 0s 3460KB
stdin
Standard input is empty
stdout
7 6 9
4 7