开放大学在线学习搜题
当前位置:首页 > 学习题库 > C程序设计语言

问题

下面程序的功能是在三个字符串中找出最小的。请分析程序填空。 #include

发布时间:2025-10-22   作者:国家开放大学   浏览:0

下面程序的功能是在三个字符串中找出最小的。请分析程序填空。

#include

#include

main()

{char s[20],str[3][20];

 int i;

 for(i=0;i<3;i++) gets(str[i]);

 strcpy(s,【1】);

 if(strcmp(str[2],s)<0) strcpy(s,str[2]);

 printf("%s\n",【2】);

}

您可能感兴趣的试题