14th Feb 2019, 3:55 PM
dongam kalyan
dongam kalyan - avatar
6 odpowiedzi
+ 5
Numbers starting with 0 are in octal representation.
14th Feb 2019, 3:58 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 3
As Valen said numbers starting with 0 are treated as octal numbers. So in your case 0101 is equivalent to 65 in decimal representation. after adding 5 then a will become 70
14th Feb 2019, 4:10 PM
Seniru
Seniru - avatar
+ 1
How can u explain
14th Feb 2019, 4:07 PM
dongam kalyan
dongam kalyan - avatar
0
Then what for hexa decimal representation
14th Feb 2019, 4:13 PM
dongam kalyan
dongam kalyan - avatar
0
And tnq for a above reply
14th Feb 2019, 4:14 PM
dongam kalyan
dongam kalyan - avatar
0
dongam kalyan in java we use 0x prefix for hexadecimal and 0b prefix for binary. i guess it is same for c
14th Feb 2019, 4:18 PM
Seniru
Seniru - avatar