Question: The input stream buffer contains the following characters ( represents the new line character) and the reading marker is currently on the space before the
The input stream buffer contains the following characters ( represents the new line character) and the reading marker is currently on the space before the A: A B C 1 2 3 D E F G H What is the output to the terminal when the code segment below is executed? Place one character in each box. Hint: Some variables have their value changed as the input is read. A indicates a space.
int num1;
char ch1, ch2;
cin.ignore(2, );
cin >> ch1 >> ch2;
cin >> num1;
cin >> ch1;
cin.ignore(4, );
cin >> ch2;
cout << ch1 << - << num1 << - << ch2;
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
