fork download
  1. #include <stdio.h>
  2.  
  3. int main(void)
  4. {
  5. int a[1][2];
  6. int b[2][1];
  7.  
  8. for(int i=0; i<1; i++){
  9. for(int j=0; j<2; j++){
  10. printf("%lu, %p \n", sizeof(a[i][j]), &a[i][j] );
  11. }
  12. }
  13. for(int i=0; i<2; i++){
  14. for(int j=0; j<1; j++){
  15. printf("%lu, %p \n", sizeof(b[i][j]), &b[i][j] );
  16. }
  17. }
  18. return 0;
  19. }
  20.  
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
4, 0x7ffef574e798 
4, 0x7ffef574e79c 
4, 0x7ffef574e7a0 
4, 0x7ffef574e7a4