In my actual project It happened accidentally here is my modified small program.
I can\'t figure out why it is giving output 10?
pub
The leading zero means the number is being interpreted as octal rather than decimal.