string check

Run Settings
LanguageC
Language Version
Run Command
#include<stdio.h> main() { int i,c=0; char str1[20],str2[20]; printf("center the first string:\n"); gets(str1); printf("enter the second string:\n"); gets(str2); for(i=0;str1[i]!='\0'&& str2[i]!='\0';i++) { if(str1[i]!=str2[i]) { c=1; break; } } if(c==0&&str1[i]=='\0'&& str2[i]=='\0') { printf("both the strings are equal"); } else { printf("strings are different"); } }
Editor Settings
Theme
Key bindings
Full width
Lines