Strncmp Explained

Strncmp is a member function of C programming language string.h library.

Prototype:

int strncmp(const char * s1,const char * s2, size_t num);

Include: string.h

Description: strncmp scans the strings up to the first numth character.Returns 0 when the strings are equal, a negative integer when s1 is less than s2, or a positive integer if s1 is greater than s2, according to the lexicographical order.

See also

References

Do-It-Yourself Turbo C++; Paul J. Perry; SAMS Publishing 1992