What is the output of the following code:

1.   What is the output of the following code:
string s1 = “X”;
string s2 = “A” + s1 + “BC” + s1 + “DEF” + s1 + “G”;
cout << s2;

2.   What is the output of the following code:

Don't use plagiarized sources. Get Your Custom Essay on
What is the output of the following code:
Just from $8 /Page 0r 300 words
Order Now

string s1 = “X”;
string s2 = “A” + s1 + “BC” + s1 + “DEF” + s1 + “G”;
cout << s[0] + s[3];

Save your time - order a paper!

Get your paper written from scratch within the tight deadline. Our service is a reliable solution to all your troubles. Place an order on any task and we will take care of it. You won’t have to worry about the quality and deadlines

Order Paper Now

3.   What is the output of the following code:
string s1 = “X”;
string s2 = “A” + s1 + “BC” + s1 + “DEF” + s1 + “G”;
cout << “Length is : “ << s.length());

4.   What is the output of the following code:
string s1 = “ABC”;
string s2 = “DEF”;
string s3;

s3 = s1 + “ “ + s2;

cout << s3;

 

In: Computer Science

Looking for a similar assignment? Get help from our qualified experts!

Order Now