Chapter 6: Problem 26
Consider the following code (and assume that it is embedded in a com- plete and correct program and then run): char next; int count = 0; cout << "Enter a line of input:\n"; cin.get(next); while (next != '\n') { if ((count%2) == 0) cout << next; count++; cin.get(next); } If the dialogue begins as follows, what will be the next line of output? Enter a line of input: abcdef gh
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.