Thanh Hoan
New member
What will be the output of the following C++ code?
A. 1511
B. 1111
C. 1115
D. 010
Code:
#include <iostream>
#include <string>
using namespace std;
int main ()
{
string str = "123hoidap!";
cout<<str.capacity();
cout<<str.size();
return 0;
}
B. 1111
C. 1115
D. 010