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;
}
#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