A few questions

This is for homework, I'm not really looking for the answers but I would appreciate some pointing in the correct direction. I think my issue is with the way these questions are worded.

Given these two lines of data:
17 13
7 3 24 6
and this input statement: cin >> int1 >> int2 >> int3;
What is the value of each variable after the statement is executed?

As far as this question goes, I'm a little lost as to what it's asking. If a user were to enter in all of these numbers only the first three would be saved. So then int1 = 17 int2 = 13 and int3 = 7. Is that what the question is asking or am I missing something?

Here is the second question:

The newline character signals the end of a line.
A. How do you generate a newline character from the keyboard?
B. How do you generate a newline character in a program’s output?

I really don't understand what each of these is asking. I know that you can add /n into code to bump it down a line or that you can use endl to do the same but also to flush the buffer


If you have any links that would help I would appreciate it, or if you could possibly clarify these questions.
What is the value of each variable after the statement is executed?
17 13 7

A. You press enter
B. '\n' or << endl

It's not trick questions, it's simply asking if you understand what or how to enter a new line.
That's what I thought they would have to be, but thank you.
Topic archived. No new replies allowed.