Got confused with the following peice of code.
In C, a constant prefixed with a
0 is an octal constant. 0100 in base 8 is
1000000 in base 2, which is 40 in hexadecimal, which is 64 in base 10. So your program is printing exactly what it should.