C File =>
/* Write a C program to compare two strings using standard library function. */
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<ctype.h>
int main() {
char s1[50],s2[50];
printf("\n Enter String1 : ");
scanf("%s",s1);
printf("\n Enter String2 : ");
scanf("%s",s2);
if(strcmp(s1,s2)==0)
printf("\n Entered strings are equal...");
else
printf("\n Entered strings are different..");
return 0;
}
Comments
Post a Comment
Please do not enter any spam link in message.