What will be the output of the following C++ code? [code] #include <iostream> #include <string> using namespace std;

What will be the output of the following C++ code?
Code:
    #include <iostream>
    #include <string>
    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
 

Tìm kiếm

Back
Top