Vidyalelo
C++ Programming · Q168

Classes and Objects in C++

Programming · C++ Programming · question 168

Q168

What will be the output of the following C++ code? #include #include using namespace std; int main(int argc, char const *argv[]) string s1 = "Hello"; string s2 = "World"; string s3 = s1 + " " + s2; cout<<s3; return 0;

A.
Hello World
Answer
B.
Hello
C.
World
D.
Error

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board