+ 1

What happening here how this possible?

6+9=63 https://code.sololearn.com/cOzoAJRePACi/?ref=app

20th Jan 2019, 11:23 AM
Programmer Raja
Programmer Raja - avatar
5 Answers
+ 2
What happens is that, when you store a char in an integer variable, it saves the char's ASCII code, which for '9' is 57. 57 + 6 = 63
20th Jan 2019, 11:29 AM
voidneo
+ 4
when you determine format with %d for characters it show its ascii code and if you use %c instead. it show character
20th Jan 2019, 11:46 AM
Mahdi Salmani
Mahdi Salmani - avatar
+ 1
How do i type caste back in to int
20th Jan 2019, 11:45 AM
Programmer Raja
Programmer Raja - avatar
+ 1
you can use atoi()
20th Jan 2019, 11:55 AM
Mahdi Salmani
Mahdi Salmani - avatar
+ 1
convert string into number: https://www.sololearn.com/learn/C/2937/
20th Jan 2019, 12:00 PM
Mahdi Salmani
Mahdi Salmani - avatar