-
What is the output of this program?
#include <iostream>
#include <string>
using namespace std;
int main ()
{
string s ("Bjarne Stroustrup founded the C++");
string s2 ("C++");
unsigned found = s.find(s2);
if (found != string :: npos)
cout << found << '\n';
return 0;
}
-
- founded the C++
- Bjarne Stroustrup
- C++
- 30
- None of these
Correct Option: D
In this program, We are finding a string by using the find method.