Vidyalelo
C++ Programming · Q67

Arrays and Strings in C++

Programming · C++ Programming · question 67

Q67

What will be the output of the following C++ code? #include #include using namespace std; int main () string str ("Test string"); for ( string :: iterator it = str.begin(); it != 5; ++it) cout << *it; return 0;

A.
Test
B.
string
C.
Test string
D.
Error
Answer

Answer: Option D

Solution

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