Vidyalelo
C++ Programming · Q87

Classes and Objects in C++

Programming · C++ Programming · question 87

Q87

What will be the output of the following C++ code? #include #include using namespace std; int main () string str ("Ubuntu"); cout << str.capacity(); cout << str.max_size(); return 0;

A.
61073741820
B.
51073741820
C.
6 and max size depends on compiler
D.
15
9223372036854770000
Answer

Answer: Option D

Solution

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