# include # include using namespace std; int main ( ) // // CHAR_ARITH shows how a CHAR variable can be assigned a literal character, // or the result of a formula involving a character and a (small) integer, // or a small integer. // // We can store the same kind of information in an INT. // // COUT displays the results differently, because it interprets and prints // out the information according to the data type that is assigned. // { char c1, c2, c3; int i1, i2, i3; c1 = 'a'; c2 = c1 + 1; c3 = 99; cout << "c1 = " << c1 << "\n"; cout << "c2 = " << c2 << "\n"; cout << "c3 = " << c3 << "\n"; i1 = 'a'; i2 = i1 + 1; i3 = c3; cout << "i1 = " << i1 << "\n"; cout << "i2 = " << i2 << "\n"; cout << "i3 = " << i3 << "\n"; return 0; }