aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/023.sh
blob: 8346e3a923060c7c5de0055acc9623f7d3f90e4c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
cat <<'EOF' > expected
sizeof(int) = 4
sizeof(int*) = 8
sizeof(char) = 1
sizeof(char*) = 8
sizeof(long) = 8
sizeof(long*) = 8
sizeof(void*) = 8
sizeof(int**) = 8
sizeof(char**) = 8
sizeof(long**) = 8
sizeof(void**) = 8
sizeof(int***) = 8
sizeof(char***) = 8
sizeof(long***) = 8
sizeof(void***) = 8
EOF
test_diff <<'EOF'
int printf();

int main() {
    printf("sizeof(int) = %d\n", sizeof(int));
    printf("sizeof(int*) = %d\n", sizeof(int*));
    printf("sizeof(char) = %d\n", sizeof(char));
    printf("sizeof(char*) = %d\n", sizeof(char*));
    printf("sizeof(long) = %d\n", sizeof(long));
    printf("sizeof(long*) = %d\n", sizeof(long*));
    printf("sizeof(void*) = %d\n", sizeof(void*));
    printf("sizeof(int**) = %d\n", sizeof(int**));
    printf("sizeof(char**) = %d\n", sizeof(char**));
    printf("sizeof(long**) = %d\n", sizeof(long**));
    printf("sizeof(void**) = %d\n", sizeof(void**));
    printf("sizeof(int***) = %d\n", sizeof(int***));
    printf("sizeof(char***) = %d\n", sizeof(char***));
    printf("sizeof(long***) = %d\n", sizeof(long***));
    printf("sizeof(void***) = %d\n", sizeof(void***));
    return 0;
}
EOF