Share
Explore BrainMass

Internal Representation of Characters in C/C++

Examine this code snippet and explain why it will work or why not it will not?

char a;
for(a = 'a';a < 'm';a++)
printf("%cn");

Solution Preview

The snippet produces the following output.
a
b
c
d
e
f
g
h
i
j
k
l

This works ...

Solution Summary

Illustrates with an example. why a C/C++ statement involving a char variable is evaluated differently.

$2.19