首页 > 动物检疫检验员
题目内容 (请给出正确答案)
[主观题]

有以下程序:#include<stdio.h>main(){int i,s=0; for(i=1;i<10;i+ =2) s+ =i+1; printf("%d\n",s

有以下程序: #include <stdio.h> main() { int i,s=0; for(i=1;i<10;i+ =2) s+ =i+1; printf("%d\n",s); } 程序执行后的输出结果是()。

A.正整数1~9的累加和

B.正整数1~10的累加和

C.正整数1~9中奇数之和

D.正整数1~10中偶数之和

查看答案
答案
收藏
如果结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能还需要:
您的账号:
发送账号密码至手机
发送
安装优题宝APP,拍照搜题省时又省心!
更多“有以下程序:#include<stdio.h>main(){…”相关的问题
第1题
下面程序的功能是将小写字母变成对应大写字母后的第二个字母。其中y变成A,z变成B。#include "stdio

下面程序的功能是将小写字母变成对应大写字母后的第二个字母。其中y变成A,z变成B。

#include "stdio.h"

main()

{char c;

while((c=getchar())!='\n')

{if(c>='a'&&c<='z')

c=c-30;

if(c>'z'||c<='z'+2)

c=c-26;}

printf("%c",c);

}

错误:______

改正:______

参考答案:错误

点击查看答案
第2题
有以下程序#include<stdio.h>main(){int a=7; while(a--); printf("%d\n",a);}程序运行后

有以下程序

#include<stdio.h>

main()

{ int a=7;

while(a--);

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

}

程序运行后的输出结果是

A.-1

B.0

C.1

D.7

点击查看答案
第3题
有以下程序 #include <stdio.h> int fun(int a, int b) { if(b==0) return a;

有以下程序 #include <stdio.h> int fun(int a, int b) { if(b==0) return a; else return(fun(-a,-b)); } main() { printf("%d\n",fun(4,2)); } 程序的运行结果是______。

A.1

B.2

C.3

D.4

点击查看答案
第4题
有以下程序#include<stdio.h>#include<string.h>main(){char x[]=“STRING”;x[0]=0;

有以下程序

#include<stdio.h>

#include<string.h>

main()

{char x[]=“STRING”;

x[0]=0;x[1]=’\0’;x[2]=’0’;

printf(”%d%d\n”,sizeof(x),strlen(x));

}

程序运行后的输出结果是()。

A.6 1

B.7 0

C.6 3

D.7 1

点击查看答案
第5题
有以下程序#include<stdio.h>main(){char ch[3][5]=("AAAA","BBB","CC"); printf("%s\n",c

有以下程序

#include<stdio.h>

main()

{ char ch[3][5]=("AAAA","BBB","CC");

printf("%s\n",ch[1]);

}

程序运行后的输m结果是

A.AAAA

B.CC

C.BBBCC

D.BBB

点击查看答案
第6题
有以下程序:#include<stdio.h>#include<string.h>#includevoid f(char*s,char*t){char k;k=*s; *

有以下程序: #include<stdio.h> #include<string.h> #include void f(char*s,char*t) { char k; k=*s; *s=*t; *t=k; s++;t--; if(*s)f(s,t): } main() {char str[10]="abcdefg",*P; P=str+strlen(str)/2+1: f(p,p-2); printf("%s\n",str); } 程序运行后的输出结果是()。

A.abcdefg

B.gfedcba

C.gbcdefa

D.abedcfg

点击查看答案
第7题
有以下程序#include<stdio.h>main(){int x=011;printf(“%d\n”,++x);}程序运行后的输出结果是

A.12

B.11

C.10

D.9

点击查看答案
第8题
有以下程序#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

点击查看答案
第9题
有以下程序(strcat函数用以连接两个字符串)#include<stdio.h>#include<string.h>main(){char a[20]=”ABCD\0EFG\0”,b[]=”IJK”;strcat(a,b);printf(”%s\n”,a);}程序运行后的输出结果是()。

A.ABCDE\0FG\0IJK

B.ABCDIJK

C.IJK

D.EFGIJK

点击查看答案
第10题
(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

点击查看答案
第11题
有以下程序: #include <stdio. h >main(){ int m =3,n =4,x; x= -m++; x=x+8/++n; prinff(" % d

有以下程序: #include <stdio. h > main() { int m =3,n =4,x; x= -m++; x=x+8/++n; prinff(" % d \n" ,x); } 程序运行后的输出结果是()。

A.3

B.5

C.-1

D.-2

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