fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int x[][3]={{1},{4,5,6}};
  5.  
  6. puts("配列の各要素のアドレス");
  7. for(size_t i=0;i<2;i++){
  8. for(size_t j=0;j<3;j++){
  9. printf("%p ",&x[i][j]);
  10. }
  11. putchar('\n');
  12. }
  13. putchar('\n');
  14.  
  15. puts("配列の各要素の大きさ");
  16. for(size_t i=0;i<2;i++){
  17. for(size_t j=0;j<3;j++){
  18. printf("%zu ",sizeof(x[i][j]));
  19. }
  20. putchar('\n');
  21. }
  22. return 0;
  23. }
  24.  
Success #stdin #stdout 0s 544KB
stdin
Standard input is empty
stdout
配列の各要素のアドレス
0x7fff2aa14d50 0x7fff2aa14d54 0x7fff2aa14d58 
0x7fff2aa14d5c 0x7fff2aa14d60 0x7fff2aa14d64 

配列の各要素の大きさ
4 4 4 
4 4 4