+ 1

Can anybody tell me why 48 is being added to the integer value?

I tried to convert an element of a char array to integer. But everytime 48 is being added to the actual value. Plz explain. See the code attached. https://code.sololearn.com/cZmd6VkaTAlW/?ref=app

27th Apr 2019, 5:50 PM
Asad Ferdous
Asad Ferdous - avatar
2 Answers
+ 3
It returns the ascii decimal value for character '3'
27th Apr 2019, 6:06 PM
raget88
raget88 - avatar