Why does:
int test() {
return 00101 % 10;
}
return 5
, while:
int test() {
return 101 % 10;
}
returns 1
? I can't think of an explanation.
Integer literals beginning with 0
like
00101
is actually an octal constant.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With