// morechar.cpp -- the char type and int type contrasted
#include <iostream>
using namespace std;
int main()
{
    char c = 'M';       // assign ASCII code for M to c
    int i = c;          // store same code in an int
    cout << "The ASCII code for " << c << " is " << i << "\n";
    
    cout << "Add one to the character code:\n";
    c = c + 1;          
    i = c;
    cout << "The ASCII code for " << c << " is " << i << '\n';

    // using the cout.put() member function to display a char
    cout << "Displaying char c using cout.put(c): ";
    cout.put(c);
    
    // using cout.put() to display a char constant
    cout.put('!');

    cout << "\nDone\n";
    return 0;
}

