Code:
#include <stdio.h>
#include <stdlib.h>
void my_strcmp(char *string1,char *string2); /*compares string one to string 2*/
int main(){
char strone[BUFSIZ];
char strtwo[BUFSIZ];
printf("Enter a string!\n");
fgets(strone,sizeof(strone),stdin);
printf("Enter another string!\n");
fgets(strtwo,sizeof(strtwo),stdin);
printf("%s%s",strone,strtwo);
my_strcmp(strone,strtwo);
return 0;
}
void my_strcmp(char *string1,char *string2){
int str1=0,str2=0,diff,;
while(string1[str1]!='\0'){
str1++;
}
while(string2[str2]!='\0'){
str2++;
}
diff=str1-str2;
printf("diff = %i\n",diff);
printf("str1 = %i\nstr2 = %i\n",str1,str2);
}
This is a start I don't feel like doing the whole case sensitive side of this program if anyone wants to build off of this I wouldn't mind