#include <iostream>         /// cin, cout
#include <climits>          /// INT_MAX

using namespace std;

/// test the get(c) stream member function
void get0()
{
    char c;

    cout << "Please type some characters: ";
    cin.get(c);

    cout << "the 1st "
         << " character typed: "
         << c << endl << endl;
}


/// test the get(p, n) stream member function
void get1()
{
    char word[10];
    int n = 5;

    /// Skip the rest of the buffer.
    cin.ignore(INT_MAX);

    cout << "Please type some characters: " << endl;
    cin.get(word, n);

    cout << "the 1st " << n - 1
         << " characters typed: "
         << word << endl << endl;
}


int main()
{
    get0();
    get1();
}