aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/039.sh
blob: f00d0248c4181c381caefa830440039cf770b035 (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
cat <<'EOF' > expected
65
65
66
67
68
EOF
test_diff <<'EOF'
void* calloc();
int printf();

int main() {
    char* source = calloc(4, sizeof(char));

    source[0] = 'A';
    source[1] = 'B';
    source[2] = 'C';
    source[3] = 'D';

    int a = source[0];

    printf("%d\n", a);
    printf("%d\n", source[0]);
    printf("%d\n", source[1]);
    printf("%d\n", source[2]);
    printf("%d\n", source[3]);

    return 0;
}
EOF