Examveda

What will be the output of the following C++ code?
#include <iostream>
#include <string>
using namespace std;
int main ()
{
    string str ("Steve jobs");
    cout << str.capacity() << "\n";
    return 0;
}

A. 9

B. 10

C. 11

D. Not Fix

Answer: Option D


Join The Discussion

Related Questions on Arrays and Strings in C plus plus