#include #include using namespace std; int main() { char *s1 = "Jim"; char s2[6] = { 'P', 'l', 'a', 'n', 'k', '\0' }; char s3[4]; const char *s4; string string4 = "Mayo"; s3[0] = 'M'; s3[1] = 's'; s3[2] = '.'; s3[3] = '\0'; s4 = string4.c_str(); cout << "The four strings: " << s1 << ", "; cout << s2 << ", " << s3 << ", " << s4 << endl; cout << endl; cout << "Strlen(s1) = " << strlen(s1); cout << ". Strlen(s2) = " << strlen(s2); cout << ". Strlen(s3) = " << strlen(s3); cout << ". Strlen(s4) = " << strlen(s4) << "." << endl; cout << endl; cout << "Strcmp(s1, \"Jim\") = " << strcmp(s1, "Jim") << endl; cout << "Strcmp(s1, \"Fred\") = " << strcmp(s1, "Fred") << endl; cout << "Strcmp(s1, \"Plank\") = " << strcmp(s1, "Plank") << endl; cout << "Strcmp(s1, \" Jim\") = " << strcmp(s1, " Jim") << endl; cout << "Strcmp(s1, \"jim\") = " << strcmp(s1, "jim") << endl; cout << "Strcmp(s1, \"Jix\") = " << strcmp(s1, "Jix") << endl; return 0; }