(40)有以下程序
#include
main()
{ FILE *f;
f=fopen(“filea.txt”,”w”);
fprintf(f,”abc”);
fclose(f);
}
若文本文件filea.txt中原有内容为:hello,则运行以上程序后,文件filea.txt中的内容为
A) helloabc B)abclo C)abc D)abchello
#include
main()
{ FILE *f;
f=fopen(“filea.txt”,”w”);
fprintf(f,”abc”);
fclose(f);
}
若文本文件filea.txt中原有内容为:hello,则运行以上程序后,文件filea.txt中的内容为
A) helloabc B)abclo C)abc D)abchello
A.40
B.16
C.8
D.4
有以下程序: #include <stdio, h> main() { int m =0256,n =256; printf("% o % o \n" ,m,n); 程序运行后的输出结果是() 。
A.0256 0400
B.0256 256
C.256 400
D.400 400
有以下程序 include<stdio.h> deftneN2 defineMN+1 defineNUM(M+1)*M/2 main(){printf(%d\n,NUM);) 程序运行后的输出结果是
A.4
B.8
C.9
D.6
有以下程序:#include <stdio, h>main(){ char a1 ='M',a2 ='m'; printf("%c\n",(a1,a2)); } 以下叙述中正确的是()。
A.程序输出大写字母M
B.程序输出小写字母m
C.格式说明符不足,编译出错
D.程序运行时产生出错信息
有以下程序
#include<stdio.h>
main()
{
int i,j,m=55;
for(i=1;i<=3;i++)
for(j=3;j<=i;j++) m=m%j;
printf(“%d”,m);
}
程序的运行结果是()。
A.0
B.1
C.2
D.3
有以下程序: #include <stdio.h>main(){ int m =12,n=34; printf("% d% d" ,m++ , ++n); printf("% d% d \n" ,n ++ , ++m); }程序运行后的输出结果是()。
A.12353514
B.12353513
C.12343514
D.12343513
有以下程序: include <stdio.h> main() { int n=0,m=1,x=2; if(! n)x-=1; if(m) x-=2; if(x) x-=3; printf("%d\n",x); } 执行后的输出结果是【 】。
有以下程序 #include <stdio.h> #include <string.h> typedef strtlct{ char name[9]; char sex;floatscore[2]; }STU; void f(STU A)
{ STU b={"Zhao",'m',85.0,90.0}; int i; strcpy(a.name,b.name); a.sex=b.sex; for(i=0;i<2;i++) a.score[i]=b
A.Qian,f,95,92
B.Qian,m,85,90
C.Zhao,f,95,92
D.Zhao,m,85,90
A.Zhao,m,290,Zhao,m,290
B.Zhao,m,290,Qian,m,290
C.Zhao,m,290,Qian,m,350
D.Zhao,m,290,Qian,f,350
(8 )有以下程序
#include <stdio.h>
main ()
{ int m,n;
scanf (" %d%d " ,&m,&n ) ;
while (m!=n )
{ while (m>n ) m=m-n;
while (m<n ) n=n-m;
}
printf (" %d\n " ,m ) ;
}
程序运行后,当输入 14 63 < 回车 > 时,输出结果是 【 8 】 。
有以下程序: #include<stdio.h> #include!(string.h> void fun(char*w,int m) { char S,*pl,*p2; p1=w;p2=w+m-; while(pl<p2){s=*pl; *p1=*p2; *p2=s;pl++;p2-;} } main() { char a[]="l23456"; fun(a,strlen(a));puts(a); } 程序运行后的输出结果是()。
A.654321
B.116611
C.161616
D.l23456
为了保护您的账号安全,请在“简答题”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!