Compare Strings Using strcmp in C

How to compare strings in C?  here are two methods to compare a string with strcmp function and without strcmp in C. strcmp is a built-in function under the header file string.h. strcmp() function take two arguments to compare the strings strcmp(s1, s2). strcmp is case sensitive and return 0 if both strings are equal.

Program Compare Strings Using strcmp in C

OUTPUT of Compare strings using strcmp in C

strcmp in C

Program Compare Strings without using strcmp in C

OUTPUTS of Program Compare strings without using strcmp in C

strcmp in C

If you want to learn about C Program for Predictive parser