Explain the working of strcmp and strcat Function?
strcmp() : This function is meant to use to compare two strings.
The strcmp() function acknowledge two strings as arguments and returns an integer value and depending upon the relative order of the two strings as follows:
1. A negative value if the first string leads the second string alphabetically. 2. A value of zero if the first string and the second string are alike (disregarding case). 3. A positive value if the second string leads the first string alphabetically.
so if strcmp( string 1, string2) returns a positive value it would indicate that string2 must be moved placing it ahead of string 1 in order to alphabetize the two strings properly.
strcat() : This function is meant to use to concatenate two strings.