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 ("apple");
        unsigned found = str.find(str2);
        if (found != string :: npos)
            cout << found << '\n';
        return 0;
    }
A. apple
B. 12
C. 23
D. Steve jobs founded the
 

Tìm kiếm

Back
Top