Why does the following result in the char entered followed by an 'a' and then a consecutive 'a' on a newline. Should it not just give one 'a' after the entered char on a newline?
1 2 3 4 5 6 7
int main ( )
{ char ch;
while (cin.get(ch) && ch != 'q'){
cout.put(ch);
cout.put('a');
}
}