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="Steve Jobs founded the apple";
        string str2 = str.substr (6, 4);
        unsigned pos = str.find("the");
        string str3 = str.substr (pos);
        cout << str2 << ' ' << str3 << '\n';
        return 0;
    }
A. Jobs the apple
B. the apple
C. Steve
D. Jobs
 

Tìm kiếm

Back
Top