I was looking at the question Single quotes vs. double quotes in C or C++. I couldn\'t completely understand the explanation given so I wrote a program:
#include
because there is no char just intgers linked int a character
like a is 62 i guess
if you try printf("%c",62); you will see a character
In C, character constants such as 'a'
have type int
, in C++ it's char
.
Regarding the last question, yes,
char ch = 'a';
causes an implicit conversion of the int
to char
.