首页 > 美容化妆人员
题目内容 (请给出正确答案)
[单选题]

有以下程序#include<stdio.h>int fun(){static int x=l:X*=2:return X:}main(){int i,s=l:for(i=l;i<=3,i++) s*=fun();printf(“%d\n”,s);}程序运行后的输出结果是

A.0

B.10

C.30

D.64

查看答案
答案
收藏
如果结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能还需要:
您的账号:
发送账号密码至手机
发送
安装优题宝APP,拍照搜题省时又省心!
更多“有以下程序#include<stdio.h>int fun(…”相关的问题
第1题
有以下程序#include "stdio.h"main(){ struct date {int year,month,day;}today; printf("%d\n",sizeof(struct date));}程序的运行结果是

A.6

B.8

C.12

D.10

点击查看答案
第2题
有以下程序#include <stdio.h>main(){ int x=1, y=2, z=3; if(x>y) if(y<z) printf(

有以下程序#include <stdio.h>main() { int x=1, y=2, z=3; if(x>y) if(y<z) printf("%d", ++z); else printf("%d", ++y); printf("%d\n", x++);}程序的运行结果是A.331 B.41 C.2 D.1

点击查看答案
第3题
有以下程序 #include<stdio.h> main() {int y=9; for(;y>0;y--) if(y%3==0)printf("%d",--y); } 程序的运行结粜是()。

A.741

B.963

C.852

D.875421

点击查看答案
第4题
(21 )有以下程序# include (stdio.h >main (){ int a = l ; b = 2 ;for (; a < 8 ; a++ ) { b

(21 )有以下程序

# include (stdio.h >

main ()

{ int a = l ; b = 2 ;

for (; a < 8 ; a++ ) { b+=a ; a+=2 ; }

printf (" %d , %d \ n ", a , b ) ;

}

程序运行后的输出结果是

A ) 9 , 18

B ) 8 , 11

C ) 7 , 11

D ) 10 , 14

点击查看答案
第5题
有以下程序:#include<stdio.h>void fun(char *a,char*B){while(*a=='*')a++;while(*b=*A){b++;a+

有以下程序: #include<stdio.h> void fun(char *a,char*B){while(*a=='*')a++; while(*b=*A){b++;a++;} } main() {char*s="****a*b****",t[80]; fun(s,t);puts(t); } 程序的运行结果是()。

A.*****a*b

B.a*b

C.a*b****

D.ab

点击查看答案
第6题
(25)有以下程序(说明:字母A的ASCII码值是65)#include <stdio.h>void fun(char *s){ while(

(25)有以下程序(说明:字母A的ASCII码值是65)

#include <stdio.h>

void fun(char *s)

{ while(*s)

{ if(*s%2) printf("%c",*s);

s++;

}

}

main()

{ char a[]="BYTE";

fun(a); printf("\n");

}

程序运行后的输出结果是

A)BY

B)BT

C)YT

D) YE

点击查看答案
第7题
有以下程序 #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\n",m); } 程序的运行结果是

A.0

B.1

C.2

D.3

点击查看答案
第8题
38) 有以下程序:#include <stdio.h>void fun(char *t,char *s){ while(*t!=0) t++;while((

38) 有以下程序:

#include <stdio.h>

void fun(char *t,char *s)

{ while(*t!=0) t++;

while((*t++=*s++)!=0);

}

main()

{ char ss[10]= " acc " ,aa[10]= " bbxxyy " ;

fun(ss,aa);

printf(" %s,%s\n " ,ss,aa);

}

程序运行结果是

A)accxyy,bbxxyy

B)acc, bbxxyy

C)accxxyy,bbxxyy

D) accbbxxyy,bbxxyy

点击查看答案
第9题
有以下程序#include<stdio.h> void fun(int *s) { static int j=0; do { s[j]=s[j]+s[j+1]

有以下程序

#include<stdio.h>

void fun(int *s)

{ static int j=0;

do { s[j]=s[j]+s[j+1]; )while(j<2);

}

main()

{ int k,a[10]={1,2,3,4,5);

for(k=1;k<3;k++)fun(a);

for(k=0;k<5;k++)printf(”%d”,a[k]);

printf("\n");

}

程序运行后的输出结果是

A) 12345

B)23445

C)34756

D) 35745

点击查看答案
第10题
有以下程序#include <stdio.h>#include <string.h>typedef struct{ char name[

有以下程序

#include <stdio.h>

#include <string.h>

typedef struct{ char name[9];char sex; float score[2]; } STU;

STU 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.score[i];

return a;

}

main()

{ STU c={"Qian",'f',95.0,92.0},d;

d=f(c); printf("%s,%c,%2.0f,%2.0f\n",d.name,d.sex,d.score[0],d.score[1]);

}

程序的运行结果是

A)Qian,f,95,92

B)Qian,m,85,90

C)Zhao,m,85,90

D)Zhao,f,95,92

点击查看答案
第11题
有以下程序: #include<stdio.h> main() {int aa[5][5]={{1,2,3,4},{5,6,1,8},{5,9,10,2},{1,2,5,6}}; int i,s=0; for(i=0;i<4;i++) s+=aa[i][2]; printf("%d",s); } 程序运行后的输出结果是()。

A.26

B.19

C.10

D.20

点击查看答案
退出 登录/注册
发送账号至手机
密码将被重置
获取验证码
发送
温馨提示
该问题答案仅针对搜题卡用户开放,请点击购买搜题卡。
马上购买搜题卡
我已购买搜题卡, 登录账号 继续查看答案
重置密码
确认修改