题目内容

为了建立如图所示的存储结构(即每个结点含两个域,data是数据域,next是指向结点的指针域),则在[]处应填入的选项是______。

A. struct link*next;
B. link next;
C. link*next;
D. struct link next;

查看答案
更多问题

有以下程序 #include<stdio.h> main() unsigned char a=2,b=4,e=5,d; d=a|b;d&=c;printf("%d\n",d); 程序运行后的输出结果是______。

A. 4
B. 3
C. 5
D. 6

若有以下程序 #include<stdio.h> #include<stdlib.h> #include<string.h> typedef struct stu char*name,gender; int score; STU; void f(char*p) p=(char*)malloc(10); strcpy(p,"Qian"); main() STU a=NULL,’m’,290,b; a.name=(char*)malloc(10); strcpy(a.name,"Zhao"); b=a; f(b.name); b.gender=’f’;b.score=350; printf("%s,%c,%d,",a.name,a.gender,a.score); printf("%s,%c,%d\n",b.name,b.gender,b.score); 则程序的输出结果是______。

A. Zhao,m,290,Zhao,f,350
B. Zhao,m,290,Qian,f,350
C. Qian,f,350,Qian,f,350
D. Qian,m,290,Qian,f,350

有以下程序 #include<stdio.h> main() FILE*fp;char str[10]; fp=fopen("myfile.dat","w"); fputs("abe",fp); fclose(fp); fp=fopen("myfile.dat","a+t"); fprintf(fp,"%d",28); rewind(fp); fscanf(fp,"%s",str); puts(str); fclose(fp); 程序运行后的输出结果是______。

A. abe28
B. 28c
C. abc
D. 因类型不一致而出错

有以下程序 #include<stdio.h> main() FILE *f; f=fopen("filea.txt","w"); fprintf(f,"abc"); fclose(f); 若文本文件filea.txt中原有内容为:hello,则运行以上程序后,文件filea.txt中的内容为

A. abc
B. abclo
C. helloabc
D. abchcllo

答案查题题库