I have a query based on the below program -
char ch;
ch = \'z\';
while(ch >= \'a\')
{
printf(\"char is %c and the value is %d\\n\", ch, ch);
ch =
I answer you too late but apart from what was already said I want to add a little.
At the 5th translation phase (part of the preprocessor) each member of the source character set is converted to the corresponding character of the execution character set. Quote from ISO 9899
, 5.1.1.2p5
- Each source character set member and escape sequence in character constants and string literals is converted to the corresponding member of the execution character set; if there is no corresponding member, it is converted to an implementation-defined member other than the null (wide) character. 7)
There is no need for the source char set to be the same as the execution char set ; as others say, if the execution char set is EBCDIC of IBM's mainframe, the logic is not the same as in the case of ASCII character set.