Help Me Understand: weird practice question

I'm having an issue understanding what the following question wants:

Assume that the code below is executed as a part of a valid C++ program:

C-strings input is as follows: are weird in C++

Show the output of the code and the contents of the arrays a and b?

1
2
3
4
5
  Valid Program: 
char a[100], b[100]; 
cout << “We value your input:\n”; 
cin >> a >> b; 
cout << a << “+” << b << endl; 


What is this question asking me, and how do I proceed in answering it? Thank you.
Last edited on
I think one point it's trying to get at is how cin works - if the input is "are weird in C++", what will cin read into those character arrays? Will it read the whole phrase?
Registered users can post here. Sign in or register to post.