• 코드:
​x
 
1
#include <stdio.h>
2
​
3
typedef struct
4
{
5
    char a;
6
    int b;
7
    double c;
8
} TYPESIZE;
9
​
10
int main(void)
11
{
12
    puts("구조체 TYPESIZE의 각 멤버의 크기는 다음과 같습니다.");
13
    printf("%d %d %d\n", sizeof(char), sizeof(int), sizeof(double));
14
    
15
    puts("구조체 TYPESIZE의 크기는 다음과 같습니다.");
16
    printf("%d\n", sizeof(TYPESIZE));
17
    return 0;
18
}
19
​
표준입력 & 실행옵션