> if (code == 100000)
This is a decimal constant (base 10)
> if (code == 000010)
This is an octal constant (base 8)
If you really want to input and compare binary, then you'll need to do it using strings.
> if (code == 100000)
This is a decimal constant (base 10)
> if (code == 000010)
This is an octal constant (base 8)
If you really want to input and compare binary, then you'll need to do it using strings.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.