0

Why am i getting output as 13116 ?

https://code.sololearn.com/ciUTJ9wG7lCU/?ref=app

19th Oct 2017, 11:55 AM
Chaitra M
Chaitra M - avatar
4 Answers
+ 9
The integer value of 'a' is 13104 Summation is 13116
19th Oct 2017, 12:10 PM
Apoorva Shenoy Nayak
Apoorva Shenoy Nayak - avatar
+ 1
a is a muti-byte character constant. Value for '3' is 0x33; for '0' — 0x30. 0x3330 is 13104 in decimal. 13104+12=13116. https://upload.wikimedia.org/wikipedia/commons/thumb/1/1b/ASCII-Table-wide.svg/1280px-ASCII-Table-wide.svg.png
19th Oct 2017, 12:15 PM
deFault
+ 1
tnq @ApoorvaShenoyNayak & @VincentBlankfield
19th Oct 2017, 12:26 PM
Chaitra M
Chaitra M - avatar
- 1
U assign int a as a character '30'
19th Oct 2017, 1:09 PM
Arun