It's a program which reads the input character by character, and prints it in the same way. The conceptual doubt I'm having here is that how is the complete string being displayed only on pressing ENTER key, even though std::cout was used on every iteration of taking each character input?
int main()
{
char c;
while(1)
{
c = cin.get();
if(cin.eof())
break;
else cout << c;
}
return 0;
}