更多“7.如果有下面的定义和赋值,则使用【 】不可以输出n中data的值。 struct SNode { unsigned id; int data; }n,*p; p=&n;”相关的问题
第2题
A、010
B、0120
C、012
D、0 1 0
E、0 1 2 0
F、0 1
G、0 1 2
点击查看答案
第3题
下列函数用于将链表中各节点的数据依次输出。 void print(struct student *head) { ① p=head; if(head!=NULL) do { printf(”%ld\n”,p->data); ② } while ( ③ ); }
点击查看答案
第4题
3.已建立学生“英语”课程的成绩链表(成绩存于score域中,学号存于num域中), 下列函数用于输出待补考学生的学号和成绩,及补考学生人数。 void require(struct student *head) { struct student *p; ① if( head!=NULL) { ② while(p!=NULL) { if( ③ ) { printf(”%7d %6.1f\n”,p->num,p->score); n++; } p=p->next; } printf(”%ld\n”, n); } }
点击查看答案
第5题
4.阅读程序,写出程序的运行结果。 void main( ) { struct st { int n: struct st *next; } a[3]={5,&a[1],7,&a[2],9,&a[0]}, *p=a; int i; for(i=0; i<3; i++) p="p-">next; printf(″p->n=%d\n″, p->n); } 程序的运行结果: ①
点击查看答案
第6题
2.已建立学生“英语”课程的成绩链表(成绩存于score域中),下列函数用于计算 平均成绩并输出。 void print(struct student *head) { struct student *p; float sum=0.0; ① ; ② if(head!=NULL) { for( ; p!=NULL; ③ ,n++) sum+=p->score; printf(“%8.1f\n”, sum/n); } }
点击查看答案
第7题
运行下列程序,输出结果是( ) struct contry { int num; char name[20]; }x[5]={1,"China",2,"USA",3,"France",4,"Englan",5,"Spanish"}; main() { int i; for (i=3;i<5;i++) printf("%d%c",x[i].num,x[i].name[0]); }> A、3F4E5S
点击查看答案
第8题
以下程序的运行结果为( ) #include <stdio.h> struct st { int x; int y; }a[2]={5,7,2,9}; main() { printf(“%d\n”,a[0].y*a[1].x); }
点击查看答案
第9题
编程题目:输入参加“三下乡”活动的若干个志愿者的信息,(包括志愿者编号、志愿者姓名和志愿者参加公益活动的次数),输入志愿者编号为0时输入结束。 建立一个单向连表,再输入一个参加公益活动的次数值,将参加公益次数大于等于该值的志愿者信息输出。 输入: 1 zhanghong 10 2 wangfengxiang 15 3 huangli 8 4 zhaolili 5 0 0 0 10 输出: 1 zhanghong 10 2 wangfengxiang 15
点击查看答案
第10题
下列选项中属于目标维度的特征是
A、秒序列
B、与时间对应
C、介入度差异
D、教学策略
点击查看答案