单项选择题
有以下程序
#include<stdio.h>
main()
FILE *kfp;charstr[10];
fp=fopen("myfile.dat","w");
fputs("abc",fp);fclose(fP);
fP=fopen("my6le.dat","a+");
fprintff(fp,"qat",28);
rewind(fp);
fscanf(fP,"%",str);puts(str);
fclose(fp);
程序运行后的输出结果是
A.abc
B.28c
C.abc28
D.因类型不一致而出错
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
有以下程序 #include<stdio.h> int f(int t[],int n); main() inta[4]=1,2,3,4,s; s=f(a,4);printf( %d n ,s); int f(int t[],int n) if(n>0)returnt[n-1]+f(t,n-1); else return 0; 程序运行后的输出结果是
A.4
B.10
C.14
D.6
点击查看答案&解析
单项选择题
有以下程序 #include <stdio.h> #define N 8 void fun(int*x,int i *x=*(x+1); main() int a[N]=1,2,3,4,5,6,7,8,i; fun(a,2); for(i=0;i<N 2;i++) printf( %d ,a[i]); printf( n ); 程序运行后的输山结果是
A.1 3 1 3
B.2 2 3 4
C.3 2 3 4
D.1 2 3 4
点击查看答案&解析
相关试题
以下程序用以删除字符串中所有的空格,请填...
以下程序的功能是:借助指针变量找出数组元...
以下程序的功能是:将值为三位正整数的变量...
有以下程序 #include <stdio.h> mai...
有以下程序 #include<stdio.h> #inc...