Choose Category
#include<stdio.h> #include<conio.h> void main() { char a[20],b[20]; int i,j,k=0; printf("enter the first string:"); scanf("%s",a); printf("enter the second string:"); scanf("%s",b); for(i=0,j=0;a[i]!=NULL||b[j]!=NULL;i++,j++) { if(a[i]!=b[j]) k++; } if(k==0) printf("string equals"); else printf("not equal"); }