Question: Need help with code. I'm getting an error for this. What would be the proper output? #include #include using namespace std; int main() { string

Need help with code.

I'm getting an error for this. What would be the proper output?

#include

#include

using namespace std;

int main()

{

string word1, word2, word3;

int a, b, c;

word1 = "see";

word2 = "please";

word3 = "thanks";

word1 = word2 + " " + word3;

word2 = word2 + word3;

a = word1.length();

b = word2.length();

c = word3.length();

cout << a << endl << b << endl << c;

cout << endl << word1 << endl << word2 << endl << word3;

return 0;

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!