nixawk / hello-c

c programming
9 stars 11 forks source link

c - logic operations #4

Open nixawk opened 7 years ago

nixawk commented 7 years ago
#include <stdio.h>

int
main(void)
{
    char x = 0x41;

    printf("%#x\n", x);
    printf("%#x\n", !x);
    printf("%#x\n", !!x);
}
code@lab:~/debug$ ./logic_operations 
0x41
0
0x1