aboutsummaryrefslogtreecommitdiffhomepage
path: root/test.c
blob: 9eac7de77cc82bf95aee31c2f348a0c4797cfaf7 (plain) (blame)
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
/* coment */

int glob;

int add (int x, int y) {
    return x + y + glob;
}

int abs(int x){
    return (x ^ x >> 31) + ((unsigned)x >> 31);
}

int popcnt(unsigned x) {
    int n = 0;
    while (x) x >>= 1, n++;
    return n;
}

int foo(int x) {
    int work[10];
    work[x]=x;
    if (x == 0)
        return 1;
    else if (x == 1)
        return -1;
    else if (x < 0)
        return x;
    else
        return 0;
}

extern void printf(char *, ...);
int main() {
    char x;
    int k = x += 1;
    return abs(-33);
}

//