hey,here a simple way to see which of 2 strings is greater :)
int str_alp(char *s1,char *s2)
{
if(strcmp(s1,s2)==0)return(0); //if they are equal
for(int i=0;s1[i]!=0;i++)
{
if(s1[i] > s2[i])return(1);
else if(s1[i] < s2[i])return(2);
}
return (2); //hey if they are not equal and s1 not greater than s2 then s2 is greater
}
See if you can use it