In C storing values that start with zero get mutated, why?
问题 For example: int main(){ int x = 01234567; printf("\n%d\n",x); return 0; } The following code produces: 342391 If I didn't include the 0 at the beginning, the value x would be 1234567, why does C store the value this way and is there any way to get it from not doing this? 回答1: Because numbers starting with 0 are represented as octal numbers. You cannot really modify this behavior, simply do not include the zero at the beginning. 回答2: Numeric constants beginning with a 0 are interpreted as