Saturday, 24 August 2013

literal character in c is int or char

literal character in c is int or char

I have a question.
For example if I declare this:
int i = 0 + 'A';
'A' is considered char or int ?
some people will use:
int i = 0 + (int)'A';
but is really necessary ?

No comments:

Post a Comment