fork download
  1. #include <stdio.h>
  2.  
  3. int main(int argc, char* argv[])
  4. {
  5. int a[2][3];
  6. printf("sizeof(a[0]) = %d\n", sizeof(a[0]));
  7. printf("sizeof(a[0][0]) = %d\n", sizeof(a[0][0]));
  8.  
  9. int b[2][3][4];
  10. printf("sizeof(b[0]) = %d\n", sizeof(b[0]));
  11. printf("sizeof(b[0][0]) = %d\n", sizeof(b[0][0]));
  12. printf("sizeof(b[0][0][0]) = %d\n", sizeof(b[0][0][0]));
  13.  
  14. return 0;
  15. }
  16.  
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
sizeof(a[0]) = 12
sizeof(a[0][0]) = 4
sizeof(b[0]) = 48
sizeof(b[0][0]) = 16
sizeof(b[0][0][0]) = 4