Home > Electronics Tutorials > C Language Tutorial > string.h - strcmp

C Language Programming Library Reference Guide

string.h - strcmp

Declaration: int strcmp(const char *str1, const char *str2); Compares the string pointed to by str1 to the string pointed to by str2.

Returns zero if str1 and str2 are equal. Returns less than zero or greater than zero if str1 is less than or greater than str2 respectively.

Note: To report broken links or to submit your projects, tutorials please email to Webmaster