Question { Accenture, 117971 }
Write a program to compare two strings without using the
strcmp() function
Answer
#include
#include
int main()
{
char a[10];
char b[10];
int check = 0;
gets(a);
gets(b);
if (strlen(a)!=strlen(b)) {
printf("Strings don't match!");
} else {
for(int i=0, j=0; a[i] != '