c program to compare 2 strings using strcmp

#include <stdio.h>
#include<conio.h>
#include <string.h>
int main()
{
char a[10], b[10];
clrscr();
printf(“Enter the first string\n”);
gets(a);
printf(“Enter the second string\n”);
gets(b);
if (strcmp(a,b) == 0)
printf(“The string %s and %s are equal\n”,a,b);
else
printf(“The string %s and %s are not equal\n”,a,b);
getch();
return 0;
}




c program to compare 2 strings using strcmp