#include
using std::cout;
using std::endl;
#include
using std::strlen;
int main()
{
char *string1 = "asdfasdfasdfasdf";
char *string2 = " f ";
char *string3 = " ";
cout << "The length of \"" << string1 << "\" is " << strlen( string1 )
<< "\nThe length of \"" << string2 << "\" is " << strlen( string2 )
<< "\nThe length of \"" << string3 << "\" is " << strlen( string3 )
<< endl;
return 0;
}
The length of "asdfasdfasdfasdf" is 16
The length of " f " is 10
The length of " " is 7