I am studying for my final exam on programming. I was checking from some previous exams that I got two input/output questions which I really don't understand how to figure out the answer.
Here are the programs:
The question is: If the input stream at line 5 is " CIS 101" (Note: " " represents blank space), The output at line 6 is:
cin >> line; // line 5
cout << line; // line 6
If the input at line 10 is "This is a test," what is the output at line 12?
const char NWLN = '\n';
charCount = 0;
while (next != NWLN)
cin.get(next); // line 10
cout.put(next); // line 12
cout << "The count is: " <<charCount; // line 14
Referring to the previous program, what would be the output at line 14?
Please someone help me how to interpret these question. I have a final comming up and really I don't understand these questions. I want to know to get the answer without using SSH.