-
What is the output of this program?
#include <iostream>
#include <string>
using namespace std;
int main ()
{
string str ("Prayagraj Shakya");
cout << str.capacity() << "\n";
return 0;
}
-
- Runtime Error
- 16
- Prayagraj Shakya
- Compilation Error
- None of these
Correct Option: B
In this program, We are finding the capacity that the str can hold.