What is the output of the following C++ program on a 64-bit system?
#include <algorithm>
#include <iostream>
#include <string>
int main() {
std::string s = "Mississippi";
std::cout << std::count(s.begin(), s.end(), 's') << ' '
<< s.find_first_of("ps") << ' '
<< s.find_last_not_of('i') << ' '
<< s.find_first_not_of("Mis") << '\n';
return 0;
}
Four s characters. The first p or s is at index 2. The last character that is not i is the p at index 9. The first character outside {M, i, s} is the p at index 8.