Vidyalelo
C++ Programming · Q46

Arrays and Strings in C++

Programming · C++ Programming · question 46

Q46

What will be the output of the following C++ code? #include #include using namespace std; int main () string str ("Steve jobs"); cout << str.length(); return 0;

A.
8
B.
10
Answer
C.
12
D.
9

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board