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
.
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
.