Why is printf output of variable different
3 answers
The numbers which are preceded by 0 is called octal numbers in c programming .
to evaluate such an expression we simply follow a conversion rule of converting octal to decimal number system
For conversion the following steps are to be proceed
such as 011
here 0 indicate the number is octal
and we are require to convert 11 which is (base 8) to decimal (base 10)
11= 1x8^1+1x8^0
=8+1
=9
-1
source to share