国开在线答案
-
2024-03-05
[单选] 从一个数据文件中读入以换行符结束的一行字符串的系统函数为( )。
-
2024-03-05
[单选] 向一个二进制文件中写入信息的函数fwrite()带有的参数个数为( )。
-
2024-03-05
[单选] 在C语言中,为只写操作打开一个文本文件的方式为( )。
-
2024-03-05
[单选] #include<stdio.h> structWorker{ charname[15]; //姓名 intage; //年龄 floatpay; //工资 }; voidmain(){ structWorkerx={“wanghua“,52,4300}; structWorkery,*p; y=x;p=&x; printf(“%s %d %6.2f“,x.name,y.age,p->pay); }
-
2024-03-05
[单选] #include<stdio.h> #include<string.h> structWorker{ charname[15]; //姓名 intage; //年龄 floatpay; //工资 }; voidmain(){ structWorkerx; char*t=“liouting“; intd=38;floatf=3493; strcpy(x.name,t); x.age=d;x.pay=f; printf(“%s %d %6.0f“,x.name,x.age,x.pay); }
-
2024-03-05
[单选] #include<stdio.h> structWorker{charname[15];intage;floatpay;}; intLess(structWorkerr1,structWorkerr2){ if(r1.age<r2.age)return1;elsereturn0; } voidmain(){ structWorkera[4]={{“abc“,25,2420},{“def“,58,4638}, {“ghi“,49,4260},{“jkl“,36,3750}}; structWorkerx=a[0]; inti; for(i=1;i<4;i++) if(Less(x,a[i]))x=a[i]; printf(“%s %d %6.0f“,x.name,x.age,x.pay); }
-
2024-03-05
[单选] voidQA(structWorkera[],intn){ inti; for(i=1;i<n;i++) scanf(“%s%d%f“,&a[i].name,&a[i].age,&a[i].pay); } 假定结构类型structWorker的定义如下: structWorker{charname[15];intage;floatpay;};
-
2024-03-05
[单选] intCount(structIntNode*f) { //f为指向一个单链表的表头指针 intc=0; while(f){ c++; f=f->next; } returnc; } 假定structIntNode的类型定义为: structIntNode{intdata;IntNode*next;};
-
2024-03-05
[单选] voidxw1(char*fname){ FILE*fout=fopen(fname,“w“); chara[20]; printf(“每个字符串长度小于20,字符串end作为结束标志“); while(1){ scanf(“%s“,a); if(strcmp(a,“end“)==0)break; fputs(a,fout); fputc('',fout); } fclose(fout); }
-
2024-03-05
[单选] 以下函数为链栈的进栈操作,x是要进栈的结点的数据域,top为栈顶指针struct node{ ElemType data;struct node *next;};structnode*top;voidPush(ElemTypex) { structnode*p; p=(structnode*)malloc __(1)__; p->data=x; __(2)__; __(3)__; }
- 首页
- 上一页
-
57280
-
57281
-
57282
-
57283
-
57284
-
57285
-
57286
-
57287
- 下一页
- 尾页