I was implementing a code to calculate a modulus of a number.
Ex.
long n = 70464307456L; // input value
int res = n % 256;
The result I got here was 0, which is expected.
The next input was 070464307467L
(this input had leading 0)
I was expecting to get the result as 11 for this input, but the result I got was 55.
But when removed the leading 0 from the input, the result was 11.
I did not understand this behavior when 0 is at the beginning.
Can someone please help me to understand?
Thanks in Advance.