Topic is like this:
My method is to use pointer array to directly compare, the purpose is to want to learn how to use pointer array, after good skillfully use:
# include & lt; stdlib.h>
# include & lt; String. H>
# include & lt; Stdio. H>
Int judge (char * country [], int n)
{
int i,j;
The char Min;
Min=* country [0];
for(i=0; i
For (j=I + 1; j
If (STRCMP (country [I], country [j]) & gt; 0)
Min=* country [j];
}
}
Return j;
}
Int main ()
{
Char * country []={0};
Int I, j=0;
Printf (" do five countries' names: \ n ");
for(i=0; i<5; I++)
{
Gets (country [I]);
}
J=judge (country, 5);
Printf (" The minimun is % s \ n ", country [j]);
return 0;
}
Compiler has been show that the parameter sets the "Min" but there's no use, I use it here it carries on the assignment, don't know why warning has been can't eliminate, can I trouble you a great god help look at this place are going to change how to eliminate the warning, thank you all for the great god! Trouble!