Compare String using STRCMP() – C Program

STRCMP() Function – C Program

Write a c program to compare two string using STRCMP() function.

STRCMP() Function – The STRCMP() Function used to compare two string, either it equal or not.

The Syntax of STRCMP() Function :

strcmp(str1, str2)  == 0 – both string str1 and str2 are equal.
strcmp(str1, str2)  !=0 – both string str1 and str2 are not equal.

Example of STRCMP() Function C Program

The String Compare C Program output is :



Leave a Reply

Your email address will not be published. Required fields are marked *

5 + 4 =

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">