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.length();
    return 0;
}

A. 8

B. 10

C. 12

D. 9

Answer: Option B


Join The Discussion

Related Questions on Arrays and Strings in C plus plus