It does display the character that you input into the command line. At least for me, I am using GCC in GNU/Linux.
I also made a couple modifications of the program. The first one displays the initial hold character as well, and one shows what happens when you don't assign hold anything.
Code:
#include <iostream>
using namespace std;
int main()
{
char hold = 'J';
cout << "before cin" << endl;
cout << hold << endl;
cout << "enter character: ";
cin >> hold;
cout << "after cin" << endl;
cout << hold << endl;
cout << "end of program"<<endl;
return 0;
}
Code:
#include <iostream>
using namespace std;
int main()
{
char hold;
cout << "before cin" << endl;
cout << hold << endl;
cout << "enter character: ";
cin >> hold;
cout << "after cin" << endl;
cout << hold << endl;
cout << "end of program"<<endl;
return 0;
}