输出多个字符串中最小的字符串。

#include <stdio.h>
#include <string.h>

int main()
{
const char *st[] = {"bag", "good", "This", "are", "Zoo", "park"};
const char *smin;
int i;

smin= 2 分;
for(i = 1; i < 6; i++){
    if(strcmp( 2 分 ) < 0){
        smin = st[i];
    }
}
printf("%s\n",  2 分 );
    
return 0;

}

1 st[0]
2.st[i],smin
3 smin

您好,我是有问必答小助手,您的问题已经有小伙伴帮您解答,感谢您对有问必答的支持与关注!
PS:问答VIP年卡 【限时加赠:IT技术图书免费领】,了解详情>>> https://vip.csdn.net/askvip?utm_source=1146287632