正在加载图片...
答案: 简答题(共5题,每题4分,共20分) 1.(x85==0)&(x号7!=0)或x号5==0医x号7!=0或!(x号5)&医x号7 分分分 (全对4分,否则按上面给分) 答 max=a[0][0]; for(i=0;1<3;i++) (1分 for(j=0;<4;++) (1分 if(a[i] [3]>max) (1分) ax=a[i][3li 不能。 ….(1分 void swap(int * x, int y) .(2分) int temp temp=*x;+x=*y;*y=temp;…(1分) 4.答:611(每个2分) 5.答 printf("num=号d, score=号f\n",tab1e1.num,tab1e1. score);(2分) printf("num=号d, score=号f\n",ptab->num,ptab-> score);…2分) 完成下列程序缺少部分(每空2分,只写出正确答案的一部分,可适当给 1分) 1 str[j-1 x[i] lp str[i] 4.x+b[k] 5. p<strs+5 p->name 三.编程题(10分) #include <stdio. h>答案: 一. 简答题(共 5 题,每题 4 分,共 20 分) 1. (x%5==0)&&(x%7!=0)或 x%5==0&&x%7!=0 或 !(x%5)&&x%7 (全对 4 分,否则按上面给分) 2. 答: int i,j; int max; max=a[0][0]; for(i=0;i<3;i++) ……………………………………(1 分) for(j=0;j<4;j++)……………………………………(1 分) { if(a[i][j]>max) ………………………………(1 分) max=a[i][j]; …………………………………(1 分) } 3. 答: 不能。…………………………………………………………………………(1 分) void swap(int * x,int * y)…………………(2 分) { int temp; temp = *x; *x = *y; *y = temp;…(1 分) } 4. 答:6 11 (每个 2 分) 5. 答: printf(”num=%d,score=%f\n”,table1.num,table1.score);(2 分) printf(”num=%d,score=%f\n”,ptab->num,ptab->score);……(2 分) 二. 完成下列程序缺少部分(每空 2 分,只写出正确答案的一部分,可适当给 1 分) 1. j-1 str[j-1] 2. p=j x[i][p] 3. str[i] i 4. r+b[k] *x 5. p<strs+5 p->name 三. 编程题(10 分) #include <stdio.h> 1 分 1 分 1 分
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有