How i can print for example?
int a = 0145236
When I want to use it, it always gives me a octal number.
How i can print for example?
int a = 0145236
When I want to use it, it always gives me a octal number.
Whenever you put zero in front of your number it is printed in octal only. That is the way c works.
However, if you take input from the user and supposing user entered 0123456
it is stored in your variable as 123456
so just don't add 0
in the beginning of your integer number when hard coding.
In case you need to add leading zeros in your number this may help Printing leading 0's in C?