Since you can't do C string copying or comparisons with operators alone, we created functions to do that for us because it's easier that way.
If you have two strings, strcpy will take the array pointed to by src and store it in dest.
Code:
char part[] = " world"
char whole[13] = "hello";
strcpy( whole, part );
cout << whole << "\n"; // output: "hello world"
strcmp compares two strings, and returns 0 if they are the same, >0 if str1 is greater, or <0 if str1 is less than str2.
Code:
char str1[] = "sage", str2[] = "set a good example";
if ( strcmp(str1, str2) < 0 )
{
cout << str1 << " is less than " << str2 << "\n"
}