fork(3) download
  1. #include <stdio.h>
  2.  
  3. int main(void){
  4. int ar[3][4] = {
  5. {1, 2, 3, 4},
  6. {5, 6, 7, 8},
  7. {9, 10, 11, 12}
  8. };
  9. printf("%d\n\n", sizeof(int (*)[4])); // 포인터 타입 크기 확인용
  10.  
  11. printf("%d\n", sizeof(ar));
  12. printf("%d\n", sizeof(ar+0));
  13. printf("%d\n", sizeof(ar+2));
  14. printf("%d\n", sizeof(*(ar+2)));
  15. return 0;
  16. }
Success #stdin #stdout 0s 2160KB
stdin
Standard input is empty
stdout
4

48
4
4
16