ExamVeda
Login
Home
Arrays and Strings in C plus plus
?

What will be the output of the following C++ 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;
}

Answer & Solution
Correct Answer: Option A
Let's discuss the solution. Join the discussion
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.