1.

What is the output of this program?
#include <iostream>
#include <string>
using namespace std;
int main ()
{
string s ("Ajit Kumar");
unsigned found = s.find_first_of("Gupta");
while (found != string :: npos)
{
s[found] = '*';
found = s.find_first_of("Gupta", found + 1);
}
cout << s << ' n';
return 0;
}

A. Ajit Kumar
B. Gupta
C. Compilation Error
D. Runtime Error
E. Segmentation fault
Answer» F.


Discussion

No Comment Found

Related MCQs