Question
#include <iostream>
#include <string>
using namespace std;
int main ()
{
string str;
string str2="Steve jobs";
string str3="He founded apple";
str.append(str2);
str.append(str3, 6, 3);
str.append(str3.begin() + 6, str3.end());
str.append<int>(5, 0x2E);
cout << str << '\n';
return 0;
}
a.
Steve jobs
b.
He founded apple
c.
Steve
d.
None of the mentioned
Posted under Object Oriented Programming Using C++
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. What is the output of this program?
Similar Questions
Discover Related MCQs
Q. Where are the strings stored?
View solution
Q. What will happen if a string is empty?
View solution
Q. Which header file is used to manipulate the string?
View solution
Q. How many maximum number of parameters does a string constructor can take?
View solution
Q. Which constant member functions does not modify the string?
View solution
Q. What is the difference between unsigned int length() and unsigned int size()?
View solution
Q. How many parameters can a resize method take?
View solution
Q. Where are standard C libraries defined in C++?
View solution
Q. Which of the following have their changes in their declaration related to constness of parameter?
View solution
Q. How many elements does a floating point number is composed of?
View solution
Q. How does the limits.h header file can be represented in C++?
View solution
Q. Pick out the correct syntax of the header file that can be used with C++.
View solution
Q. How many groups of output of operation are there in c++?
View solution
Q. Pick out the correct objects about the instantiation of output stream.
View solution
Q. What is meant by ofstream in c++?
View solution
Q. How many types of output stream classes are there in c++?
View solution
Q. What must be specified when we construct an object of class ostream?
View solution
Q. Which operator is used for input stream?
View solution
Q. Where does a cin stops it extraction of data?
View solution
Q. Which is used to get the input during runtime?
View solution
Suggested Topics
Are you eager to expand your knowledge beyond Object Oriented Programming Using C++? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!