多选题设有如下结点定义及链表情况,删除其中学号为101的语句是( )。struct node{ int num; /* 学号 */ struct node *next;} *head, *p; A. p=head->next; p->next=head->next; free(p); B. p=head->next; free(head); head=p; C. p=head->next; head->next=p->next; free(p); D. p=head->next; free(p->next); p->next=NULL;简答题以下程序中函数fun的功能是:统计person所指结构体数组中所有性别(sex)为'M'的记录个数,存入变量n中,并作为函数值返回。请填空。 #include #define N 3 typedef struct { int num; char nam[10]; char sex; }SS; int fun(SS person[]) { int i, n=0; for(i=0; i if( =='M') n++; return n; }简答题设有定义struct date{ int day; char month; int year; } dd, *pd = d ,请写出引用结构体成员day用指针描述的两种形式 (1) 、 (2) 。多选题设有定义struct st { int x; float y; } time, *t; t=&time; 则对time中成员的引用正确的是( )。 A. st.x B. t.x C. (*t).x D. time->x简答题下面程序段的功能是:统计不带头结点的链表first中的结点个数,请填空。 struct link { struct link *next; char data; }; struct link *first, *p=first; int c=0; while( (1) ) { p= (2) ; (3) ; }多选题C语言共用体变量在程序运行期间( )。 A. 所有成员一直驻留在内存中 B. 只有一个成员驻留在内存中 C. 部分成员驻留在内存中 D. 没有成员驻留在内存中简答题设有共用体类型和共用体变量定义如下: union Utype { char ch; int n; long m; float x; double y; }; Union Utype aa; 假定aa的地址为4357720,则aa.n的地址是 (1) ,aa.y的地址是 (2) 。 执行赋值语句aa.n=100;后,再执行语句printf(“%c\n”, aa.ch);,其输出值是 (3) 。多选题下面正确的叙述是( )。 A. 结构一经定义,系统就给它分配了所需要的内存单元 B. 结构体变量和共用体变量所占内存长度是各成员所占内存长度之和 C. 可以对结构体类型和结构体类型变量赋值、存取和运算 D. 定义共用体变量后,不能引用共用体变量,只能引用共用体变量中的成员简答题下面程序的功能是:按学生的姓名查询其成绩排名和平均成绩。查询时可连续进行,直到输入“0”时才结束,请填空。 #include #include #define NUM 4 struct student { int rank; char *name; float score; }; (1) stu[ ] = { 3, "liming", 89.0, 4, "zhanghua",78.2, 1, "wangming", 90.6, 2, "liqing", 96.2 }; int main(void) { char str[10]; int i; do { scanf("%s", str); for (i=0; i if ( (2) ) { printf("%8s\n", stu[i].name); printf("%3d\n", stu[i].rank); printf("%5.1f\n", stu[i].score); break; } if ((i>=NUM)&& strcmp( str,"0") != 0) printf("not found\n"); } while (strcmp( (3) ) != 0); return 0; }多选题设有如下定义,若要使p指向data中的n域,正确的赋值语句是( )。 struct sk{ int n; float x;} data;int *p; A. p=&data.n; B. *p=data.n; C. p=(struct sk *)&data.n; D. p=(struct sk *)data.n;