Here is the world famous how many characters in this C++ string job interview question?
Also, here is a way to find the number of words in a string (same as count number of specific characters) This always reports 1 more than so maybe display count – 1?
using namespace std;
int i, numspaces;
cout << "Type in a string\n";
// checks each character in the string
for (i=0; i