武汉理工大学20秋C语言程序设计(本)-作业一_1资料

[复制链接]
发表于 2020-12-19 09:02:35 | 显示全部楼层 |阅读模式
C语言程序设计(本)-作业一
1.[单选题] 以下叙述中正确的是(    )
无忧答案网答案资料下载,请参考帮助中心说明
    A.C源程序中注释部分可以出现在程序中任意合适的地方
    B.<p class="MsoNormal" style="display:inline;"><span lang="EN-US">  <!--[if gte vml 1]><v:shape id="图片_x0020_101"   o:spid="_x0000_i1124" type="#_x0000_t75" style='width:208.8pt;height:14.4pt;   mso-position-horizontal-relative:page;mso-position-vertical-relative:page'>   <v:imagedata src="cyy01-60.files/image104.png" o:title=""/>  </v:shape><![endif]-->  <!--[if !vml]--><img width="278" height="19" v:shapes="图片_x0020_101" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image104.png">  <!--[endif]--></span><span lang="EN-US" style="font-size:12.0pt">  <o:p></o:p></span></p>
    C.C源程序编译时注释部分的错误将被发现
    D.构成C源程序的基本单位是函数,所有函数名都可以由用户命名
    答:——A——
2.[单选题] 以下程序段运行后,x[1]的值为(   )。 int x[5]={5,4,3,2,1};x[1]=x[3]+x[2+2]-x[3-1];
    A.6
    B.0
    C.1
    D.5
    答:——B——
3.[单选题] (   )为正确的用户标识符。
    A.<p class="MsoNormal" style="display:inline;"><span lang="EN-US">  <!--[if gte vml 1]><v:shape id="图片_x0020_115"   o:spid="_x0000_i1138" type="#_x0000_t75" style='width:28.8pt;height:11.4pt;   mso-position-horizontal-relative:page;mso-position-vertical-relative:page'>   <v:imagedata src="cyy01-60.files/image118.png" o:title=""/>  </v:shape><![endif]-->  <!--[if !vml]--><img width="38" height="15" v:shapes="图片_x0020_115" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image118.png">  <!--[endif]--></span><span lang="EN-US" style="font-size:12.0pt">  <o:p></o:p></span></p>
    B.<p class="MsoNormal" style="display:inline;"><span lang="EN-US">  <!--[if gte vml 1]><v:shape id="图片_x0020_116"   o:spid="_x0000_i1139" type="#_x0000_t75" style='width:18pt;height:15.6pt;   mso-position-horizontal-relative:page;mso-position-vertical-relative:page'>   <v:imagedata src="cyy01-60.files/image119.png" o:title=""/>  </v:shape><![endif]-->  <!--[if !vml]--><img width="24" height="21" v:shapes="图片_x0020_116" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image119.png">  <!--[endif]--></span><span lang="EN-US" style="font-size:12.0pt">  <o:p></o:p></span></p>
    C.<p class="MsoNormal" style="display:inline;"><span lang="EN-US">  <!--[if gte vml 1]><v:shape id="图片_x0020_117"   o:spid="_x0000_i1140" type="#_x0000_t75" style='width:32.4pt;height:16.2pt;   mso-position-horizontal-relative:page;mso-position-vertical-relative:page'>   <v:imagedata src="cyy01-60.files/image120.png" o:title=""/>  </v:shape><![endif]-->  <!--[if !vml]--><img width="43" height="22" v:shapes="图片_x0020_117" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image120.png">  <!--[endif]--></span><span lang="EN-US" style="font-size:12.0pt">  <o:p></o:p></span></p>
    D.<p class="MsoNormal" style="display:inline;"><span lang="EN-US">  <!--[if gte vml 1]><v:shape id="图片_x0020_118"   o:spid="_x0000_i1141" type="#_x0000_t75" style='width:20.4pt;height:15.6pt;   mso-position-horizontal-relative:page;mso-position-vertical-relative:page'>   <v:imagedata src="cyy01-60.files/image121.png" o:title=""/>  </v:shape><![endif]-->  <!--[if !vml]--><img width="27" height="21" v:shapes="图片_x0020_118" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image121.png">  <!--[endif]--></span><span lang="EN-US" style="font-size:12.0pt">  <o:p></o:p></span></p>
    答:——D——
4.[单选题] 若定义 int a=-5,b=-8,c=-12; 则表达式 a>=b||b<c 的值为(    )。
    A.变量i的值
    B.变量j的值
    C.0
    D.1
    答:————
5.[单选题] 以下程序中的循环执行了(    )次。   #define N 2   #define M N+1   #define NUM (M+1)*M/2   main()   { int i,n=0;     for(i=0;i<NUM;i++) n++;  printf("%d\n",n);    }
    A.5
    B.6
    C.8
    D.9
    答:————
6.[单选题] 若有定义:float x=3.5,y=3.6; 则表达式(    )的值为6。
    A.(int)x+(int)y
    B.x+y
    C.(int)(x+y)
    D.int(x+y)
    答:————
7.[单选题] 若已定义 int a; 不会产生死循环的语句是(   )。
    A.for( ; ;a+= 2);
    B.for(a=10; ;a--);
    C.for( ;(a=getchar())!= '\n';  );
    D.while(-1) {a++;}
    答:————
8.[单选题] 若已定义 int x=-16,y=-12,z; 语句z=x<=y; 运行后z的值为(    )。
    A.t
    B.1
    C.f
    D.0
    答:————
9.[单选题] <p class="MsoNormal" style="line-height:20.0pt;mso-line-height-rule:exactly"><span lang="EN-US">  <!--[if gte vml 1]><v:shape id="图片_x0020_159" o:spid="_x0000_i1182"   type="#_x0000_t75" style='width:283.8pt;height:18pt;   mso-position-horizontal-relative:page;mso-position-vertical-relative:page'>   <v:imagedata src="cyy01-60.files/image162.png" o:title=""/>  </v:shape><![endif]-->  <!--[if !vml]--><img width="378" height="24" v:shapes="图片_x0020_159" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image162.png">  <!--[endif]--></span><span lang="EN-US" style="mso-bidi-font-size:10.5pt">  <o:p></o:p></span></p>
    A.5
    B.7
    C.10
    D.0
    答:————
10.[单选题] 以下程序的运行结果是(    )。     int fun(int a[4][4])    { int i;       for(i=0;i<4;i++)    printf("%2d",a[i][2]);    printf("\n");}    main()    { int a[4][4]={1,1,2,2,1,9,0,0,2,4,0,0,0,5,9,8};      fun(a);}
    A.1 9 0 5
    B.2 0 0 0
    C.2 0 0 8
    D.2 0 0 9
    答:————
11.[单选题] 设有说明 int x=0,y=2;     则执行 if(x=0)  y=1+x;     else y=x-1;    后,变量y的值是(    )
    A.-1
    B.0
    C.1
    D.2
    答:————
12.[单选题] <p class="MsoNormal" style="line-height:20.0pt;mso-line-height-rule:exactly"><span lang="EN-US">  <!--[if gte vml 1]><v:shape id="图片_x0020_40" o:spid="_x0000_i1063"   type="#_x0000_t75" style='width:415.2pt;height:17.4pt;   mso-position-horizontal-relative:page;mso-position-vertical-relative:page'>   <v:imagedata src="cyy02-60.files/image040.png" o:title=""/>  </v:shape><![endif]-->  <!--[if !vml]--><img width="554" height="23" v:shapes="图片_x0020_40" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy02-60.files/image040.png">  <!--[endif]--></span><span lang="EN-US" style="mso-bidi-font-size:10.5pt"><span style="color:white">   <o:p></o:p></span></span></p>
    A.1   2
    B.2   3
    C.3   3
    D.3   4
    答:————
13.[单选题] C语言函数体由(   )括起来。
    A.<p class="MsoNormal" style="display:inline;"><span lang="EN-US">  <!--[if gte vml 1]><v:shape id="图片_x0020_27"   o:spid="_x0000_i1051" type="#_x0000_t75" style='width:30pt;height:11.4pt;   mso-position-horizontal-relative:page;mso-position-vertical-relative:page'>   <v:imagedata src="cyy01-60.files/image028.png" o:title=""/>  </v:shape><![endif]-->  <!--[if !vml]--><img width="40" height="15" v:shapes="图片_x0020_27" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image028.png">  <!--[endif]--></span><span lang="EN-US" style="font-size:12.0pt">  <o:p></o:p></span></p>
    B.<p class="MsoNormal" style="display:inline;"><span lang="EN-US">  <!--[if gte vml 1]><v:shape id="图片_x0020_28"   o:spid="_x0000_i1052" type="#_x0000_t75" style='width:21.6pt;height:17.4pt;   mso-position-horizontal-relative:page;mso-position-vertical-relative:page'>   <v:imagedata src="cyy01-60.files/image029.png" o:title=""/>  </v:shape><![endif]-->  <!--[if !vml]--><img width="29" height="23" v:shapes="图片_x0020_28" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image029.png">  <!--[endif]--></span><span lang="EN-US" style="font-size:12.0pt">  <o:p></o:p></span></p>
    C.<p class="MsoNormal" style="display:inline;"><span lang="EN-US">  <!--[if gte vml 1]><v:shape id="图片_x0020_29"   o:spid="_x0000_i1053" type="#_x0000_t75" style='width:24.6pt;height:17.4pt;   mso-position-horizontal-relative:page;mso-position-vertical-relative:page'>   <v:imagedata src="cyy01-60.files/image030.png" o:title=""/>  </v:shape><![endif]-->  <!--[if !vml]--><img width="33" height="23" v:shapes="图片_x0020_29" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image030.png">  <!--[endif]--></span><span lang="EN-US" style="font-size:12.0pt">  <o:p></o:p></span></p>
    D.<p class="MsoNormal" style="display:inline;"><span lang="EN-US">  <!--[if gte vml 1]><v:shape id="图片_x0020_30"   o:spid="_x0000_i1054" type="#_x0000_t75" style='width:21.6pt;height:16.2pt;   mso-position-horizontal-relative:page;mso-position-vertical-relative:page'>   <v:imagedata src="cyy01-60.files/image031.png" o:title=""/>  </v:shape><![endif]-->  <!--[if !vml]--><img width="29" height="22" v:shapes="图片_x0020_30" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image031.png">  <!--[endif]--></span><span lang="EN-US" style="font-size:12.0pt">  <o:p></o:p></span></p>
    答:————
14.[单选题] 对二维数组的正确定义是(   )
    A.<p class="MsoNormal" style="display:inline;"><span lang="EN-US">  <!--[if gte vml 1]><v:shape id="图片_x0020_71"   o:spid="_x0000_i1088" type="#_x0000_t75" style='width:120.6pt;height:15.6pt;   mso-position-horizontal-relative:page;mso-position-vertical-relative:page'>   <v:imagedata src="cyy02-60.files/image066.png" o:title=""/>  </v:shape><![endif]-->  <!--[if !vml]--><img width="161" height="21" v:shapes="图片_x0020_71" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy02-60.files/image066.png">  <!--[endif]--></span><span lang="EN-US" style="font-size:12.0pt"><span style="color:white">   <o:p></o:p></span></span></p>
    B.<p class="MsoNormal" style="display:inline;"><span lang="EN-US">  <!--[if gte vml 1]><v:shape id="图片_x0020_72"   o:spid="_x0000_i1089" type="#_x0000_t75" style='width:120pt;height:18pt;   mso-position-horizontal-relative:page;mso-position-vertical-relative:page'>   <v:imagedata src="cyy02-60.files/image067.png" o:title=""/>  </v:shape><![endif]-->  <!--[if !vml]--><img width="160" height="24" v:shapes="图片_x0020_72" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy02-60.files/image067.png">  <!--[endif]--></span><span lang="EN-US" style="font-size:12.0pt"><span style="color:white">   <o:p></o:p></span></span></p>
    C.<p class="MsoNormal" style="display:inline;"><span lang="EN-US">  <!--[if gte vml 1]><v:shape id="图片_x0020_73"   o:spid="_x0000_i1090" type="#_x0000_t75" style='width:122.4pt;height:15.6pt;   mso-position-horizontal-relative:page;mso-position-vertical-relative:page'>   <v:imagedata src="cyy02-60.files/image068.png" o:title=""/>  </v:shape><![endif]-->  <!--[if !vml]--><img width="163" height="21" v:shapes="图片_x0020_73" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy02-60.files/image068.png">  <!--[endif]--></span><span lang="EN-US" style="font-size:12.0pt"><span style="color:white">   <o:p></o:p></span></span></p>
    D.<p class="MsoNormal" style="display:inline;"><span lang="EN-US">  <!--[if gte vml 1]><v:shape id="图片_x0020_74"   o:spid="_x0000_i1091" type="#_x0000_t75" style='width:115.8pt;height:19.8pt;   mso-position-horizontal-relative:page;mso-position-vertical-relative:page'>   <v:imagedata src="cyy02-60.files/image069.png" o:title=""/>  </v:shape><![endif]-->  <!--[if !vml]--><img width="154" height="26" v:shapes="图片_x0020_74" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy02-60.files/image069.png">  <!--[endif]--></span><span lang="EN-US" style="font-size:12.0pt"><span style="color:white">   <o:p></o:p></span></span></p>
    答:————
15.[单选题] <p class="MsoNormal" style="line-height:20.0pt;mso-line-height-rule:exactly"><span lang="EN-US">  <!--[if gte vml 1]><v:shape id="图片_x0020_94" o:spid="_x0000_i1110"   type="#_x0000_t75" style='width:239.4pt;height:21pt;   mso-position-horizontal-relative:page;mso-position-vertical-relative:page'>   <v:imagedata src="cyy02-60.files/image088.png" o:title=""/>  </v:shape><![endif]-->  <!--[if !vml]--><img width="319" height="28" v:shapes="图片_x0020_94" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy02-60.files/image088.png">  <!--[endif]--></span><span lang="EN-US" style="mso-bidi-font-size:10.5pt"><span style="color:white">   <o:p></o:p></span></span></p>
    A.0
    B.3
    C.12
    D.15
    答:————
16.[单选题] C源程序的调试是指对源程序进行(    )。
    A.录入与编辑
    B.查错与编译
    C.查错与排错
    D.连接与运行
    答:————
17.[单选题] 下面关于C语言变量的叙述中,错误的是(   )。
    A.可以用define关键字定义变量
    B.变量名用大小写字母是有区别的
    C.C语言允许不同基本类型的变量之间进行混合运算
    D.C语言中要求对变量作强制定义的主要理由是:便于确定类型和分配空间
    答:————
18.[单选题] 以下程序的运行结果是(    )。      func(int a,int b)      {int c;       c=(a>b)?(a-b)a+b);       return(c);  }      main()      { int x=7,y=3;        printf("%d\n",func(x,y));  }
    A.3
    B.4
    C.7
    D.10
    答:————
19.[单选题] <p class="MsoNormal">        <span> <img width="444" height="21" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image099.png" /> </span><span> </span></p>
    A.        char<int<long int = folat<double
    B.<p class="MsoNormal" style="display:inline;">        <span> <img width="195" height="20" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image101.png" /> </span><span style="font-size:12.0pt;"> </span></p>
    C.<p class="MsoNormal" style="display:inline;">        <span> <img width="205" height="20" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image102.png" /> </span><span style="font-size:12.0pt;"> </span></p>
    D.<p class="MsoNormal" style="display:inline;">        <span> <img width="198" height="21" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image103.png" /> </span><span style="font-size:12.0pt;"> </span></p>
    答:————
20.[单选题] 以下程序运行后,文件test.txt的内容是(    )。   #include <stdio.h>   main()   {  FILE *fp;     char str[][10]={"first","second"};     fp = fopen("test.txt", "w");     if(fp!=NULL)    fprintf(fp,"%s",str[0]);     fclose(fp);     fp = fopen("test.txt", "w");     if(fp!=NULL)    fprintf(fp,"%s",str[1]);     fclose(fp);   }
    A.first
    B.second
    C.first second
    D.second first
    答:————
21.[单选题] 逗号表达式 (a=15,a*4),a+15 的值为(    )。
    A.15
    B.30
    C.75
    D.60
    答:————
22.[单选题] 若有以下定义:      struct node      { int data;   struct node *next;     } *p,*q,*t;   指针p、t和q分别指向图中所示结点:      p                t                q     ↓               ↓               ↓   ┌──┬──┐  ┌──┬──┐  ┌──┬──┐   │data│next┼→│data│next┼→│data│next┼→...   └──┴──┘  └──┴──┘  └──┴──┘                                                               现要将t和q所指结点的先后位置交换,同时要保持链表的连续,以下错误的程序段是(    )
    A.t->next=q->next;p->next=q;q->next=t;
    B.p->next=q;t->next=q->next;q->next=t;
    C.q->next=t;t->next=q->next;p->next=q;
    D.t->next=q->next;q->next=t;p->next=q;
    答:————
23.[单选题] 若有定义:int a=3,b=2,c=1,k; 则表达式k=a>b>c的值是(    )。
    A.0
    B.1
    C.2
    D.3
    答:————
24.[单选题] <p class="MsoNormal">        <span> <img width="533" height="25" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy02-60.files/image059.png" /> </span><span><span style="color:white;"> </span></span></p>
    A.<p class="MsoNormal" style="display:inline;">        <span> <img width="112" height="24" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy02-60.files/image060.png" /> </span><span style="font-size:12.0pt;"><span style="color:white;"> </span></span></p>
    B.<p class="MsoNormal" style="display:inline;">        <span> <img width="227" height="22" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy02-60.files/image061.png" /> </span><span style="font-size:12.0pt;"><span style="color:white;"> </span></span></p>
    C.<p class="MsoNormal" style="display:inline;">        <span> <img width="64" height="24" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy02-60.files/image062.png" /> </span><span style="font-size:12.0pt;"><span style="color:white;"> </span></span></p>
    D.<p class="MsoNormal" style="display:inline;">        <span> <img width="176" height="25" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy02-60.files/image063.png" /> </span><span style="font-size:12.0pt;"><span style="color:white;"> </span></span></p>
    答:————
25.[单选题] 执行下面程序段后,输出字符B的个数是(    )        x=0;       while(x<=5){         printf("B");           x+=2;    }
    A.0个
    B.3个
    C.5个
    D.6个    更多答案进 ap5u.com 南开答案q761296021
    答:————
26.[单选题] C语言中,若缺省定义函数返回值类型,则该函数默认返回值类型是(    )。
    A.void
    B.long
    C.int
    D.double
    答:————
27.[单选题] 若按如下定义,函数link的功能是(    )。其中head指向链表首结点,整个链表结构如下图:          ┌──┬─┐  ┌──┬─┐        ┌──┬──┐   head →│data│  ┼→│data│  ┼→… → │data│NULL│           └──┴─┘  └──┴─┘        └──┴──┘     struct node     {int data;      struct node *next;  };     void link(struct node* head)     {struct node *p=head;      while(p!=NULL)     { if(p->data%2==1)  printf("%d ",p->data);          p=p->next; }    }
    A.计算链表head中结点的个数
    B.遍历链表head,输出表中值为奇数的元素
    C.删除链表head中的所有结点
    D.插入一个新元素到链表head中
    答:————
28.[单选题] <p class="MsoNormal"><span lang="EN-US">  <!--[if gte vml 1]><v:shape id="图片_x0020_88"   o:spid="_x0000_i1105" type="#_x0000_t75" style='width:415.2pt;height:35.4pt;   mso-position-horizontal-relative:page;mso-position-vertical-relative:page'>   <v:imagedata src="cyy02-60.files/image083.png" o:title=""/>  </v:shape><![endif]-->  <!--[if !vml]--><img width="554" height="47" v:shapes="图片_x0020_88" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy02-60.files/image083.png">  <!--[endif]--></span></p>
    A.<p class="MsoNormal" style="display:inline;"><span lang="EN-US">  <!--[if gte vml 1]><v:shape id="图片_x0020_89"   o:spid="_x0000_i1106" type="#_x0000_t75" style='width:73.8pt;height:14.4pt;   mso-position-horizontal-relative:page;mso-position-vertical-relative:page'>   <v:imagedata src="cyy02-60.files/image084.png" o:title=""/>  </v:shape><![endif]-->  <!--[if !vml]--><img width="98" height="19" v:shapes="图片_x0020_89" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy02-60.files/image084.png">  <!--[endif]--></span><span lang="EN-US" style="font-size:12.0pt"><span style="color:white">   <o:p></o:p></span></span></p>
    B.<p class="MsoNormal" style="display:inline;"><span lang="EN-US">  <!--[if gte vml 1]><v:shape id="图片_x0020_90"   o:spid="_x0000_i1107" type="#_x0000_t75" style='width:68.4pt;height:21pt;   mso-position-horizontal-relative:page;mso-position-vertical-relative:page'>   <v:imagedata src="cyy02-60.files/image085.png" o:title=""/>  </v:shape><![endif]-->  <!--[if !vml]--><img width="91" height="28" v:shapes="图片_x0020_90" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy02-60.files/image085.png">  <!--[endif]--></span><span lang="EN-US" style="font-size:12.0pt"><span style="color:white">   <o:p></o:p></span></span></p>
    C.<p class="MsoNormal" style="display:inline;"><span lang="EN-US">  <!--[if gte vml 1]><v:shape id="图片_x0020_91"   o:spid="_x0000_i1108" type="#_x0000_t75" style='width:69.6pt;height:18.6pt;   mso-position-horizontal-relative:page;mso-position-vertical-relative:page'>   <v:imagedata src="cyy02-60.files/image086.png" o:title=""/>  </v:shape><![endif]-->  <!--[if !vml]--><img width="93" height="25" v:shapes="图片_x0020_91" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy02-60.files/image086.png">  <!--[endif]--></span><span lang="EN-US" style="font-size:12.0pt"><span style="color:white">   <o:p></o:p></span></span></p>
    D.<p class="MsoNormal" style="display:inline;"><span lang="EN-US">  <!--[if gte vml 1]><v:shape id="图片_x0020_92"   o:spid="_x0000_i1109" type="#_x0000_t75" style='width:68.4pt;height:14.4pt;   mso-position-horizontal-relative:page;mso-position-vertical-relative:page'>   <v:imagedata src="cyy02-60.files/image087.png" o:title=""/>  </v:shape><![endif]-->  <!--[if !vml]--><img width="91" height="19" v:shapes="图片_x0020_92" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy02-60.files/image087.png">  <!--[endif]--></span><span lang="EN-US" style="font-size:12.0pt"><span style="color:white">   <o:p></o:p></span></span></p>
    答:————
29.[单选题] 若有定义:int a=5,b=2;  则表达式b= (a!=5)的值为(    )。
    A.5
    B.0
    C.3
    D.2
    答:————
30.[单选题] C语言中,错误的int类型的常数是(    )
    A.1E5
    B.0
    C.037
    D.0xaf
    答:————
31.[单选题] x的值在-20至-5之间为“真”,否则为“假”的正确逻辑表达式为(    )。
    A.-20<x<-5
    B.x>-20 && x<-5
    C.!(x>-20) && !(x<-5)
    D.-5<x<-20
    答:————
32.[单选题] 若有定义:struct teacher{int num; char sex; int age;}teacher1;则下面叙述错误的是(    )。
    A.struct是结构类型的关键字
    B.struct teacher是用户定义的结构类型
    C.num、sex、age都是结构变量teacher1的成员
    D.teacher1是结构类型名
    答:————
33.[单选题] <p class="MsoNormal"><span lang="EN-US">  <!--[if gte vml 1]><v:shape id="图片_x0020_6"   o:spid="_x0000_i1028" type="#_x0000_t75" style='width:207pt;height:49.2pt;   mso-position-horizontal-relative:page;mso-position-vertical-relative:page'>   <v:imagedata src="cyy02-60.files/image006.png" o:title=""/>  </v:shape><![endif]-->  <!--[if !vml]--><img width="276" height="66" v:shapes="图片_x0020_6" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy02-60.files/image006.png">  <!--[endif]--></span></p>
    A.4
    B.5
    C.8
    D.9
    答:————
34.[单选题] <p class="MsoNormal"><span lang="EN-US">  <!--[if gte vml 1]><v:shape id="图片_x0020_107"   o:spid="_x0000_i1123" type="#_x0000_t75" style='width:307.8pt;height:36pt;   mso-position-horizontal-relative:page;mso-position-vertical-relative:page'>   <v:imagedata src="cyy02-60.files/image101.png" o:title=""/>  </v:shape><![endif]-->  <!--[if !vml]--><img width="410" height="48" v:shapes="图片_x0020_107" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy02-60.files/image101.png">  <!--[endif]--></span></p>
    A.<p class="MsoNormal" style="display:inline;"><span lang="EN-US">  <!--[if gte vml 1]><v:shape id="图片_x0020_108"   o:spid="_x0000_i1124" type="#_x0000_t75" style='width:105.6pt;height:16.2pt;   mso-position-horizontal-relative:page;mso-position-vertical-relative:page'>   <v:imagedata src="cyy02-60.files/image102.png" o:title=""/>  </v:shape><![endif]-->  <!--[if !vml]--><img width="141" height="22" v:shapes="图片_x0020_108" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy02-60.files/image102.png">  <!--[endif]--></span><span lang="EN-US" style="font-size:12.0pt"><span style="color:white">   <o:p></o:p></span></span></p>
    B.<p class="MsoNormal" style="display:inline;"><span lang="EN-US">  <!--[if gte vml 1]><v:shape id="图片_x0020_109"   o:spid="_x0000_i1125" type="#_x0000_t75" style='width:107.4pt;height:20.4pt;   mso-position-horizontal-relative:page;mso-position-vertical-relative:page'>   <v:imagedata src="cyy02-60.files/image103.png" o:title=""/>  </v:shape><![endif]-->  <!--[if !vml]--><img width="143" height="27" v:shapes="图片_x0020_109" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy02-60.files/image103.png">  <!--[endif]--></span><span lang="EN-US" style="font-size:12.0pt"><span style="color:white">   <o:p></o:p></span></span></p>
    C.<p class="MsoNormal" style="display:inline;"><span lang="EN-US">  <!--[if gte vml 1]><v:shape id="图片_x0020_110"   o:spid="_x0000_i1126" type="#_x0000_t75" style='width:114pt;height:16.2pt;   mso-position-horizontal-relative:page;mso-position-vertical-relative:page'>   <v:imagedata src="cyy02-60.files/image104.png" o:title=""/>  </v:shape><![endif]-->  <!--[if !vml]--><img width="152" height="22" v:shapes="图片_x0020_110" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy02-60.files/image104.png">  <!--[endif]--></span><span lang="EN-US" style="font-size:12.0pt"><span style="color:white">   <o:p></o:p></span></span></p>
    D.<p class="MsoNormal" style="display:inline;"><span lang="EN-US">  <!--[if gte vml 1]><v:shape id="图片_x0020_111"   o:spid="_x0000_i1127" type="#_x0000_t75" style='width:108.6pt;height:18pt;   mso-position-horizontal-relative:page;mso-position-vertical-relative:page'>   <v:imagedata src="cyy02-60.files/image105.png" o:title=""/>  </v:shape><![endif]-->  <!--[if !vml]--><img width="145" height="24" v:shapes="图片_x0020_111" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy02-60.files/image105.png">  <!--[endif]--></span><span lang="EN-US" style="font-size:12.0pt"><span style="color:white">   <o:p></o:p></span></span></p>
    答:————
35.[单选题] <p class="MsoNormal" style="line-height:20.0pt;mso-line-height-rule:exactly"><span lang="EN-US">  <!--[if gte vml 1]><v:shape id="图片_x0020_23" o:spid="_x0000_i1046"   type="#_x0000_t75" style='width:261pt;height:23.4pt;   mso-position-horizontal-relative:page;mso-position-vertical-relative:page'>   <v:imagedata src="cyy02-60.files/image023.png" o:title=""/>  </v:shape><![endif]-->  <!--[if !vml]--><img width="348" height="31" v:shapes="图片_x0020_23" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy02-60.files/image023.png">  <!--[endif]--></span><span lang="EN-US" style="mso-bidi-font-size:10.5pt"><span style="color:white">   <o:p></o:p></span></span></p>
    A.0
    B.1
    C.9
    D.20
    答:————
36.[单选题] 下面程序的输出结果是(    )。        #include <stdio.h>       int num=10;       func()       {int num=4;        return ++num;   }       void main()       { printf("%d\n",func());   }
    A.4
    B.5
    C.10
    D.11
    答:————
37.[单选题] 若有函数定义:      int func()      {static int m=0;   return m++;   }   以下程序段运行后屏幕输出为(    )。     int i;      for(i=1;i<=4;i++)          func();       printf("%d",func());
    A.0
    B.1
    C.4
    D.5
    答:————
38.[单选题] 若有定义:union u_type {int x;  float y[3];  char z; }a;     则变量a的长度是(    )。
    A.1
    B.4
    C.12
    D.15
    答:————
39.[单选题] 以下程序的运行结果是(    )。         void main()    {int s = 0, i = 0;         while(i< 8)           { i++;              if(i%2==0)          continue;              s+=i;           }         printf("%d\n",s);   }
    A.36
    B.7
    C.16
    D.12
    答:————
40.[单选题] 以下程序段的运行结果是(    )。     int a=1;  printf("%d, %d, %d\n", a, ++a, a++);
    A.3,3,1
    B.1, 2, 2
    C.1, 2, 3
    D.3, 2, 1
    答:————

无忧答案网  附件是答案,核对题目下载

武汉理工大学20秋C语言程序设计(本)-作业一_1.zip

5.25 KB, 下载次数: 0, 下载积分: 贡献 1

售价: 5 金币  [记录]  [购买]

答案参考

快速回复 返回顶部 返回列表