#include <stdio.h>


struct node {

    int i;

    struct node *next;

};


struct node x;


main()

{

    printf("%d\n",sizeof(x.i)); //결과 4

    printf("%d\n",sizeof(x.next)); //결과 8(컴파일러 종류에 따라 4로나오는것도있지만 제 기준으로 8)

    printf("%d\n",sizeof(x)); // 결과 16

    printf("%d\n",sizeof(struct node)); // 결과 16

}


왜 맨 마지막 두개의 printf 결과가 16이 되는지 잘 모르겠습니다.


구조체는 연속된 메모리 공간을 할당하니까 4+8 = 12로 나와야하는거 아닌가요?