This is kinda stupid question, but it's interesting for me )
This is what i get with visual studio 2013
int i = 07; // i == 7
int i = 16; // i == 16
int i = 00016; // i == 14, why?
int i = 05016; // i == 2574, wow )
int i = 08; // compile error, compiler expects octal number...
If number starts with zero and contains 8, it's compile error. Is this normal? And what exactly compiler does with starting zeros if 00016 == 14?
Thanks to all ))
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…