首页 > 建筑规划> 注册测绘师
题目内容 (请给出正确答案)
[主观题]

下列程序的输出结果是 #inClUde<iostream> using namespace std; intmain() { Char a[]="HellO,W

下列程序的输出结果是

#inClUde<iostream>

using namespace std;

intmain()

{

Char a[]="HellO,World";

Char*ptr=a;

while(*ptr)

{

if(*ptr>='a'&& *ptr <='Z')

cout<<char(*ptr+'A' -'a');

else cout<<*ptr;

ptr++;

}

retur0;

}

A.HELLO,WORLD

B.Hello,world

C.hELLO,wORLD

D.hellO,world

查看答案
答案
收藏
如果结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能还需要:
您的账号:
发送账号密码至手机
发送
安装优题宝APP,拍照搜题省时又省心!
更多“下列程序的输出结果是 #inClUde<iostream> …”相关的问题
第1题
下列程序的输出结果是______。 include<iostream.h>void main(){ char a[]="abcdabcabfgacd"; in

下列程序的输出结果是______。

include<iostream.h>

void main()

{

char a[]="abcdabcabfgacd";

int i1=0,i2=0,i=0;

while(a[i])

{

if(a[i]=="a")i1++;

if(a[i]=="b")i2++;

i++;

}

cout<<i1<<""<<i2<<endl;

}

点击查看答案
第2题
下列程序输出的结果是__。#include<iostream>usingnamespacestd;int__tmain(){intnInteger=5,rI
下列程序输出的结果是__。#include<iostream>usingnamespacestd;int__tmain(){intnInteger=5,rI

下列程序输出的结果是__。

#include<iostream>usingnamespacestd;int__tmain()

{intnInteger=5,rInteger=nInteger;rInteger=nInteger+1;

cout<<<nInteger<<","<<rInteger<<endl;return0;}

点击查看答案
第3题
下列程序的输出结果是()。 #include #defineSQR(x)x*x voidmain() {intk=2; printf(“%d/n”,SQR(k+1)); }。

A.9

B.6

C.5

D.4

点击查看答案
第4题
下列程序的输出结果是【】。 include<stdio.h> void fun(int x) { if(x/2>0) fun(x/2); printf("%d"

下列程序的输出结果是【 】。

include <stdio.h>

void fun(int x)

{

if(x/2>0) fun(x/2);

printf("%d",x);

}

main()

{

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

}

点击查看答案
第5题

下列程序的输出结果是 ()。 #include<iostream.h> void main() { int x=6,y=8; if(x1++<6) cout<<++y<<end1; if(x>6) cout<<--y<<end1; else cout<<y++<<end1; }

A.8

B.9

C.7

D.编译不成功

点击查看答案
第6题
以下程序的输出结果是()。#include<stdio.h>main(){inta=1,b=2,c=3;printf(“%d”,c>b>a);}

A.2

B.1

C.0

D.3

点击查看答案
第7题
以下程序的输出结果是【】。include<stdio.h> main () int a[3][3] ={{1,2,9},{3,4,8},{5,6,7} } ,

以下程序的输出结果是【 】。

include <stdio.h>

main ()

int a[3][3] ={{1,2,9},{3,4,8},{5,6,7} } ,i,s=0;

for(i=0;i<3;i++) s+ =a[i][i] + a[i][3-i-1];

pfintf("% d \n" ,s);

点击查看答案
第8题
以下程序运行后的输出结果是【 】。 include <stdio.h> main() { int a=1,b=3,c=5;

以下程序运行后的输出结果是【 】。 include <stdio.h> main() { int a=1,b=3,c=5; if (c=a+b) printf("yes\n"); else printf("no\n"); }

点击查看答案
第9题
下述程序的输出结果是()。#include<stdio.h> int fun(int a){intb=0;staticintc=3;b++,c++;return

下述程序的输出结果是()。 # include <stdio.h> int fun(int a) { int b=0; static int c=3; b++,c++; return a+b+c; } void main() { int x=2,i; for(i=1;i<3;i++) printf("%d",fun(x)); }

A.56

B.67

C.78

D.89

点击查看答案
第10题
以下程序的输出结果是()。#include<iostream>#include<stdlib>using namespace std;void func(cha

以下程序的输出结果是()。 #include<iostream> #include<stdlib> using namespace std; void func(char **m) { ++m; cout<<*m<<endl; } main() { static char *a[]={"MORNING","AFTERNOON","EVENING"); char **n; n=a; func(n); system("PAUSE"); return 0; }

A.为空

B.MORNING

C.AFTERNOON

D.EVENING

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