Answer:Consider the following code segment:
void main()
{
string s1("Time and tide wait for none");
int f;
f=s1.find("t");
cout<<endl<<f;
f=s1.find_first_of("t");
cout<<"\t"<<f;
f=s1.find_last_of("t");
cout<<"\t"<<f;
f=s1.find_first_not_of("t");
cout<<"\t"<<f;
f=s1.find_last_not_of("t");
cout<<"\t"<<f;
}
What will be the output of the above code?
Options
a) 0 0 17 1 26
b) 0 9 17 0 26
c) 9 0 17 0 26
d) 9 9 17 0 26
Answer : d) 9 9 17 0 26