Monday, 23 February 2015

STRCMP() FUNCTION IN C


#include<string.h>
#include<stdio.h>
#include<conio.h>
main()
{
char str1[50],str2[50];
clrscr();

puts("String1 :");
gets(str1);
puts("String2 :");
gets(str2);

if(strcmp(str1,str2)==0)
{
printf("\n Both are Equal");
}
else
{
printf("\n Both are Different");
}
getch();
}

No comments:

Post a Comment