I'm having problems reading a number initialized with long long
long long valid;
scanf("%lli", &valid);
INPUT:
025
The variable valid
will have as content 21
and not 25
If I change from %lli
to %llu
this already fixes the problem, but I do not understand why, by using %llu
it should be unsigned long long
and not long long
. >
-
How to fix this? Will I have to change to
%llu
? -
Why does this happen when we write a number starting with
0
?