阅读以下说明和C函数,将应填入 (n) 处的字句写在答题纸的对应栏内。 [说明]

题型:填空题

问题:

阅读以下说明和C函数,将应填入 (n) 处的字句写在答题纸的对应栏内。
[说明]
某班级有N名学生,他们可根据自己的情况选修名称和数量不尽相同的课程。设N等于6,学生信息、所选课程及成绩用链表结构存储,如图5-1所示。


程序中相应的类型定义如下:
#define N 6
struct node
char cname[5]; /*课程名*/
int grade; /*成绩*/
struct node *next; /*指针,指示某学生选修的下一门课程及成绩*/
;
struct student
char xh[5]; /*学号*/
char name[20]; /*姓名*/
struct node *link; /*指针,指示出选修的课程及成绩链表*/
stud_info[n];
Stud_info[]为一个全局数组。
函数func(char kc[],int *num)的功能是统计选修了课程名为kc的学生的人数,并返回该课程的平均成绩(若无人选修该课程,则平均成绩为0),参数num带回选修课程kc的学生人数。
[C语言函数]
double func(char kc[], int *num)

int i, count=0, sum=0; /*count用于记录选修课程名为kc的学生的人数*/
double avg=0.0;
struct node *p;
for(i=0; i<N; i++)
p= (1) ; /*取第土个学生所修课程链表的头指针*/
while (p)
if( (2) )
sum= (3) ;
count++;
break;;
/* if*/
p=p->next;
/*while*/

(4) ;
if( (5) )
avg=(double) sum /count; /*计算平均成绩*/
return avg;
/*func*/
从下列的2道试题(试题六至试题七)中任选1道解答。如果解答的试题数超过1道,则题号小的1道解答有效。

考点:计算机软件水平考试初级程序员初级程序员下午试题
题型:填空题

( )是保险合同的客体。

A.保险标的

B.保险对象

C.投保人于保险标的上的利益

D.被保险人的财产、健康或者身体

题型:填空题

It is not polite to arrive at a dinner party more than 15 to 20 minutes      1           . The host or hostess usually waits for all the guests to arrive before serving the meal. If someone is late, the food may be spoiled, and so might the host or hostess’s spirits. If you have to be late, call and tell them to start  2           you.

It’s even 3   (bad) to be early! The host or hostess will probably not be ready. If you are early, drive or walk around the block a few times, or just sit in your car  4  the right time.

Though it is often important to arrive on time, yet on the other hand, for open houses, the host or hostess invites guests to arrive and leave    5      a certain time. You can arrive at any time within the time he or she gives you.

It’s polite to bring an empty stomach, but it’s even nicer to bring a small present. The present should not cost a lot, or you might embarrass the host or hostess.      6     (flower), wine, or a box of candy will do fine. Never bring money as a present.

In an   7              (introduce), the order of a name is: (1) 、the given name;(2) 、the family name. In other words the given name comes first. It’s important not   8               to learn and remember names, but to respect them often in   9              (converse). After the introduction,we usually call friends   10           their given names. Older people may want you call them their titles and family names, such as “Mr. Jones”、 “Mrs. Johnson” or “Dr. Brown”.

题型:填空题

根据海关规定,需办理纳税手续的旅客,要选择红色通道通关。 ( )

题型:填空题

在治疗肺炎球菌肺炎使用青霉素时,错误的方法是()

A.一般患者每次肌注80万单位,每8小时1次

B.每日剂量800万单位,加在500毫升输液中缓慢静滴

C.重症患者每日剂量800万单位,分3次静脉滴注

D.静脉滴药时每次用量应在l小时内滴完

E.对青霉素过敏者不可使用此药

题型:填空题

改变()从改变自己开始,改变()从改变自己开始。

A、他人

B、同事

C、团队

D、环境

更多题库