单项选择题
有如下程序: #include
main( ) { FILE *fp1; fp1=fopen("f1.txt","w"); fprintf(fp1,"abc"); fclose(fp1); } 若文本文件f1.txt中原有内容为:good,则运行以上程序后文件f1.txt中的内容为( )。
A.goodabc
B.abcd
C.abc
D.abcgood
点击查看答案
<上一题
目录
下一题>
热门
试题
单项选择题
若有定义:float x=1.5;int a=1,b=3,C=2;则正确的switch语句是【 】。
A.switch(x) {case 1.0:printf("*\n");case 2.0:prinff("**\n");}
B.switch((int)x); {case 1:printf("*\n");case 2:printf("**\n");}
C.switch(a+b) {case 1:printf("*\n");case 2+1:prinff("**\n");}
D.switch(a+b) {case 1:printf("*\n"); case c:printf("**\n");}
点击查看答案&解析
单项选择题
现有以下结构体说明和变量定义,如图所示,指针P、q、r分别指向一个链表中连续的三个结点。struct node{char data;struct node*next;}*P,*q,*r;现要将q和r所指结点交换前后位置,同时要保持链表的连续,以下不能完成此操作的语句是【 】。
A.q->next=r->next;p->next=r;r->next:q;
B.P->next=r;q->next=r->next;r->next=q;
C.q->next=r->next;r->next=q;P->next=r;
D.r->next=q;p->next=r;q->next=r->next;
点击查看答案&解析
相关试题
有以下程序:main( )int f1 (int x...
以下程序中函数reverse( )的功能是将a所...
以下程序中函数scmp的功能是返回形参指针s...
有以下程序int f1 (int x,inty){re...
有以下程序:struct STU{char name[1...