Doubt regarding initialising char

is it necessary to start with
char ch=‘a’;
ch=99;

can’t it be done like
char ch=99;
will it be an error?

no that ll be fine too. Both can be ways to initialize char

1 Like