Vidyalelo
C++ Programming · Q48

Classes and Objects in C++

Programming · C++ Programming · question 48

Q48

What will be the output of the following C++ code? #include #include using namespace std; int main () std::string str ("Example."); str.back() = '!'; std::cout << str << endl; return 0;

A.
Example.!
B.
Example.
C.
Example!
Answer
D.
Example!.

Answer: Option C

Solution

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