A character gives integer as output if we input an integer into it but this doesn't happen when an integer is assigned t
By : user3512855
Date : March 29 2020, 07:55 AM
help you fix your problem While you assign an integer to the character variable, it reads the integer from the memory and store at its location and while interpreting that char value, it returns ASCII equivalent of it. While reading cin buffer into the character variable(char) it reads 1 byte of the char or its ASCII value in the memory and gives the output as ASCII equivalent of it.