#include <stdio.h>
#include <string.h>
int main()
{
char a[100], b[100];
printf("Enter the first string\n");
gets(a);
printf("Enter the second string\n");
gets(b);
if( strcmp(a,b) == 0 )
printf("Entered strings are equal.\n");
else
printf("Entered strings are not equal.\n");
return 0;
}
/*-via Programming Hub for Android, a top rated Programming App on Google Play
https://play.google.com/store/apps/details?id=com.freeit.java*/
Sunday, August 16, 2015
Program: Compare two Strings
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment