计算机二级考试C 语言试题7

时间:2011-09-20 13:17:31

微信搜索关注"91考试网"公众号,领30元,获取事业编教师公务员等考试资料40G

53个字符串,要求找出其中最大者

 

include<stdio.h>

 

#include<string.h>

 

void main ( )

 

{

 

   char string20;

 

   char str3][20;                          运行结果:CHINA

 

   int i;                                                 HOLLAND

 

   for (i=0;i<3;i++)                                       AMERICA

 

     gets (stri);                        the largest string isHOLLAND

 

if (strcmp(str0,str1)>0)

 

     strcpy(string,str0)

 

     else strcpy(string,str1);

 

if (strcmp(str2,string)>0)

 

     strcpy(string,str2);

 

printf(″\nthe largest string is

 

       n%sn,string);

 

}

 


微信搜索关注"91考试网"公众号,领30元,获取公务员事业编教师考试资料40G
【省市县地区导航】【考试题库导航】

电脑版  |  手机版  |  返回顶部