[ create a new paste ] login | about

Link: http://codepad.org/hbybmSKP    [ raw code | output | fork ]

C, pasted on Sep 10:
1
2
3
4
5
6
7
8
9
10
11
12
13
main() {
    char c = 0xff;
    if( c == -1 ) {
         printf("char 0xff is -1\n");
    }
    printf("%04x\n", ~1);
    printf("%04x\n", ~1 + 1);
    printf("%04x\n", (~1) + 1);
    printf("%04x\n", -1);
    printf("%04x\n", 0xffffffff);
    printf("%04x\n", (int) c);
    exit(0);
}


Output:
1
2
3
4
5
6
7
char 0xff is -1
fffffffe
ffffffff
ffffffff
ffffffff
ffffffff
ffffffff


Create a new paste based on this one


Comments: