输出多个字符串中最小的字符串。
#include <stdio.h>
#include <string.h>
int main()
{
const char *st[] = {"bag", "good", "This", "are", "Zoo", "park"};
const char *smin;
int i;
smin=
st[0]
;
for(i = 1; i < 6; i++){
if(strcmp(
st[i],smin
) < 0){
smin = st[i];
}
}
printf("%s\n",
smin
);
return 0;
}