0

Hello why the type of the output is an integer?

Here is thr code and thanks for helping! https://code.sololearn.com/cV9cm4GrEZaz/?ref=app

8th Jun 2020, 8:57 AM
YoungMind
YoungMind - avatar
4 Answers
+ 4
Looks like implicit conversion has happened here https://www.geeksforgeeks.org/type-conversion-in-c/amp/
8th Jun 2020, 9:01 AM
Abhay
Abhay - avatar
+ 1
The result is of type byte. Every char is a representation of a byte. If you want the char you must do (char)(h+i) witch adds i to the byte value of h and then converts it to char
8th Jun 2020, 9:22 AM
Gabriel Ilie
Gabriel Ilie - avatar
+ 1
Thank you both of you mates!
8th Jun 2020, 9:26 AM
YoungMind
YoungMind - avatar
0
I didn't understand you question.
9th Jun 2020, 1:02 PM
Naveed
Naveed - avatar