The C language does not support "nested" functions, so this will not compile:
int main(int argc, char **argv)
char toupp (char ch)
{
if (ch<=97&&ch<122)
{
You need to declare the
toupp
function outside the body of the
main
function:
char toupp (char ch)
{
if (ch<=97&&ch<122)
{
...
}
...
}
int main(int argc, char **argv)
{
...
}
As for the rest of it ... sort your indentation out so it's readable - that's not clear at all!
When you get bits like this:
for(i=0; s1[i]!='\0';i++)
{
if (toupp(s1[i]!=toupp(s2[i]))
{
return 1;}
}
return 0;
}
{
char input[100];
It is not at all clear what you meant to have happen!