#include <stdio.h>
#include <string.h>
int main() {
char str1[20];
char *str2;
printf("enter string \n"); **// using %c input**
scanf("%c",str1);
printf(" string 1 is %s \n",str1);
printf("enter string 2 \n");
scanf("%s",*str2); //using %s input
printf(" string 1 and 2 is %c and %s \n",str1,str2);**strong text**
int a=strcmp(str1,str2); //**comparing both**
printf("%d",a);
return 0;
}
took input from user using %c and %s then used strcmp for comparing the equality of the strings