有以下程序:includemain(){FILE *pf;char*s1="China",*s2="Beijing":pf=fopen("abc.da 有以下程序: #include<stdio.h> main() {FILE *pf; char*s1="China",*s2="Beijing": pf=fopen("abc.dat","wb+"); fwrite(s2,7,1,pf); rewind(pf); /*文件位置指针回到文件开头*/ fwrite(s1,5,1,pf); fclose(pf); } 以上程序执行后abc.dat文件的内容是( )。A.ChinaB.ChinangC.ChinaBeijingD.BeijingChina

有以下程序:includemain(){FILE *pf;char*s1="China",*s2="Beijing":pf=fopen("abc.da

有以下程序: #include<stdio.h> main() {FILE *pf; char*s1="China",*s2="Beijing": pf=fopen("abc.dat","wb+"); fwrite(s2,7,1,pf); rewind(pf); /*文件位置指针回到文件开头*/ fwrite(s1,5,1,pf); fclose(pf); } 以上程序执行后abc.dat文件的内容是( )。

A.China

B.Chinang

C.ChinaBeijing

D.BeijingChina


相关考题:

有以下程序#include stdio.hmain(){ FILE *pf;char *s1="China",*s2="Beijing";pf=fopen("abc.dat","wb+");fwrite(s2,7,1,pf);rewind(pf);fwrite(s1,5,1,pf);fclose(pf);}以上程序执行后 abc.dat 文件的内容是A)ChinaB)ChinangC)ChinaBeijingD)BeijingChina

有以下程序include void WriteStr(char*fn,char*str){FILE*fp; fp=fopen(fn,"w");fpu 有以下程序 #include <stdio.h> void WriteStr(char *fn, char *str) { FILE *fp; fp=fopen(fn,"w"); fputs(str,fp);fclose(fp); } main() { WriteStr("t1.dat","start"); WriteStr("t1.dat","end"); } 程序运行后,文件t1.dat中的内容是A.startB.endC.startendD.endrt

有以下程序:includevoid WriteStr(char *fn, char *sir){FILE * fP; fP=fopen(fn,"w") 有以下程序: #include<stdio.h> void WriteStr(char *fn, char *sir) { FILE * fP; fP=fopen(fn,"w"); fput6(str,fp); fclose(fp); } main() { WriteStr("t1.dar","start"); WrlteStr("t1.dat","end"); } 程序运行后,文件t1.dat中的内容是( )。A.startB.endC.startendD.endrt

有以下程序并includeincludefun(char * w,int n){char t,*s1,*s2; s1=w;s2= 有以下程序 并include<stdio.h> #include<string.h> fun(char * w,int n) { char t,*s1,*s2; s1=w; s2=w+n-1; while(s1<s2) { t=*s1++; * s1=*s2--; * s2=t; } } main() { char p[]="1234567"; fun(p,strlen(p)); puts(p); } 程序运行后的输出结果是( )A.1234567B.7654321C.1711717D.7177171

有以下程序includevoid WriteStr(char*fn,char*str){FILE*fp; fp=fopen(fn,"w");fputs 有以下程序 #include<stdio.h> void WriteStr(char*fn,char*str) { FILE*fp; fp=fopen(fn,"w");fputs(str,fp);fclose(fp); } main() { writeStr("t1.dat","start"); WriteStr("t1.dat","end"); } 程序运行后,文件t1.dat中的内容是A.startB.endC.startendD.endrt

有以下程序 include main() { FILE*pf, char *s1="China", 有以下程序 #include <stdio.h> main() { FILE*pf, char *s1="China",*s2="Beijing"; pf=fopen("abc.dat","wb+"); fwrite(s2,7,1,pf); rewind(pf); /*文件位置指针回到文件开头*/ fwrite(s1,5,1,pf); fclose(pf); } 以上程序执行后abc.dat文件的内容是______。A.ChinaB.ChinangC.ChinaBeijingD.BeijingChina

有下列程序: #includestdi0.h voidmain( ) {FILE*pf; char*s1="China",*s2="Beijing"; pf=fopen("abc.dat","wb+"); fwrite(s2,7,1,pf); rewind(pf);/*文件位置指针回到文件开头*/ fwrite(s1,5,1,pf); fclose(pf); } 以上程序执行后abc.dat文件的内容是( )。A.ChinaB.ChinangC.ChinaBeijingD.BeijingChina

有以下程序:include main( ){ehar str[ ] [10] = { "China" ," Beijing" } , * p = 有以下程序: #include < stdio. h > main( ) { ehar str[ ] [10] = { "China" ," Beijing" } , * p = str[o]; printf( "% s \n", p + 10); }程序运行后的输出结果是( )。A.ChinaB.BeijingC.ngD.ing

有以下程序:include void swap(char * x,ehar * y){ char t;t= *x; *x: *y; *y=t;main 有以下程序:#include <stdio.h>void swap(char * x,ehar * y){ char t; t= *x; *x: *y; *y=t;main ( ){ char *s1 ="abc", * s2 ="123"; swap(s1 ,s2); printf("%s,%s \n" ,s1 ,s2);}程序执行后的输出结果是( )。A.123,abeB.abe,123C.1bc,a23D.321,cba