C++ Programming/Code/Standard C Library/Functions/strcmp

strcmp
The function strcmp compares str1 and str2, then returns:

For example:

Note that if str1 or str2 are missing a null-termination character, then strcmp may not produce valid results. For a similar (and safer) function that includes explicit bounds checking, see strncmp.


 * Related topics: memcmp - strcat - strchr - strcoll - strcpy - strlen - strncmp - strxfrm