Vidyalelo
C++ Programming · Q62

Classes and Objects in C++

Programming · C++ Programming · question 62

Q62

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

A.
1511
Answer
B.
1111
C.
1115
D.
010

Answer: Option A

Solution

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