(7)有以下程序#include <stdio.h>main(){ int x;scanf("%d",&x);if(x>15) printf("
(7)有以下程序
#include <stdio.h>
main()
{ int x;
scanf("%d",&x);
if(x>15) printf("%d",x-5);
if(x>10) printf("%d",x);
if(x>5) printf("%d\n",x+5);
}
若程序运行时从键盘输入12<回车>,则输出结果为 【7】 。
(7)有以下程序
#include <stdio.h>
main()
{ int x;
scanf("%d",&x);
if(x>15) printf("%d",x-5);
if(x>10) printf("%d",x);
if(x>5) printf("%d\n",x+5);
}
若程序运行时从键盘输入12<回车>,则输出结果为 【7】 。
有以下程序#include "stdio.h"main(){ struct date { int number; float fenzhi; char name; }stu; printf("%d\n",sizeof(stu));} 程序的运行结果是A.3 B.5C.7 D.8
有以下程序段#include <stdio.h>void fun(char*fname,char*st){ FILE * myf; int i; myf=fopen(fname,"w"); for(i=0;i<strlen(st);i++)fputc(st[i],myf); fclose(myf);}main(){ fun("test.t","new world"); fun("test.t","hello,");}程序执行后,文件test.t中的内容是A.hello, B.new worldhello,C.new world D.hello,rld
若运行以下程序时,从键盘输入ADescriptor<CR>(<CR>表示回车),则下面程序的运行结果是 #include<stdio.h> main() {char c; int v0=1,v1=0,v2=0; do{ switch(c=getchar()) { case'a':case'A': case'e':case'E': case'i':case'I': case'o':case'O': case'u':case'U':v1+=1;
A.v0=7,v1=4,v2=7
B.v0=8,v1=4,v2=8
C.v0=11,v1=4,v2=11
D.v0=13,v1=4,v2=12
A.10,1
B.20,1
C.10,2
D.20,2
有以下的程序 #include<stdio.h> void fun(char *fname,char *st) { FILE *myf; int i; myf=fopen(fname,"w"); for(i=0;i<strlen(st);i++)fputc(st[i],myf); fclose(myf); } main() { fun("test.t","new world");fun("test.t","hello,");} 程序执行后,文件test.t中的内容是()
A.hello,
B.new worldhello,
C.new world
D.hello,rld
A.*pt->y
B.pt->x
C.++pt->x
D.(pt++)->x
A.hello
B.helloworld
C.hello\0world
D.hello0world
有以下程序: #include <stdio.h> struct STU { char name[10]; int num; }; void f1(struct STU c) { struct STU b={"LiSiGuo",2042}; c=b; } void f2(struct STU *c) { struct STU b={"SanDan",2044}; *c=b; } main() { struct STU a={"YangSan",2041}, b={"WangYin",2043}; f1(a); f2(&b); printf("%d%d\n",a.num,b.hum); } 执行后的输出结果是()。
A.2041 2044
B.2041 2043
C.2042 2044
D.2042 2043
为了保护您的账号安全,请在“简答题”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!