#include #include // required for the string function library int main() { const int MAXELS = 50; char string1[MAXELS] = "Hello"; char string2[MAXELS] = "Hello there"; int n; n = strcmp(string1, string2); if (n < 0) cout << string1 << " is less than " << string2 << endl; else if (n == 0) cout << string1 << " is equal to " << string2 << endl; else cout << string1 << " is greater than " << string2 << endl; cout << "\nThe length of the string " << string1 << " is " << strlen(string1) << " characters" << endl; cout << "The length of the string " << string2 << " is " << strlen(string2) << " characters" << endl; strcat(string1," there World!"); cout << "\nAfter concatenation, string1 contains " << "the string value\n" << string1 << "\nThe length of this string is " << strlen(string1) << " characters" << endl; cout << "\nType in a sequence of characters for string2:\n"; cin.getline(string2, MAXELS); strcpy(string1, string2); cout << "\nAfter copying string2 to string1, " << "the string value in string1 is:\n" << string2 << "\nThe length of this string is " << strlen(string1) << " characters" << endl; cout << "\nThe starting address of the string1 string is: " << (void *) string1 << endl; return 0; }