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 *

twelve − 8 =