U.S. Independence Day Deal! Unlock 25% OFF Today – Limited-Time Offer - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

C++ Institute CPA-21-02 Exam - Topic 7 Question 56 Discussion

What is the output of the program?#include #include using namespace std;int main () {string s1 = "Hello", s2 = "World";s2 = s1 + s2;cout
B) It prints: HelloWorld
A) It prints: Hello
C) It prints: WorldHello
D) It prints: WorldHelloWorld

C++ Institute CPA-21-02 Exam - Topic 7 Question 56 Discussion

Actual exam question for C++ Institute's CPA-21-02 exam
Question #: 56
Topic #: 7
[All CPA-21-02 Questions]

What is the output of the program?

#include

#include

using namespace std;

int main () {

string s1 = "Hello", s2 = "World";

s2 = s1 + s2;

cout << s2;

return 0;

}

Show Suggested Answer Hide Answer
Suggested Answer: B

Contribute your Thoughts:

0/2000 characters

Currently there are no comments in this discussion, be the first to comment!


Save Cancel