aboutsummaryrefslogtreecommitdiffstats
path: root/examples/double_for_loop.c
blob: c58301d43f79eb212e853e1db9b70e8548317bcf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
int f (int A[1000], int B[1000]) {
    for (int i = 0; i < 1000; i++) {
        if (i % 2) {
            A[i] = B[i];
        }
    }
    for (int i = 0; i < 1000; i++) {
        if (! (i % 2)) {
            A[i] = B[i];
        }
    }
    return A[100];
}