选择题:下列程序的输出结果是 #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




参考答案:

下列函数原型声明中错误的是A.void Fun(int x=O,int y=0);B.void Fun(int x,int y);C.void Fun(i

下列函数原型声明中错误的是A.void Fun(int x=O,int y=0);B.void Fun(int x,int y);C.void Fun(i

查看答案

已知程序中已经定义了函数test,其原型是int test(int,int,int);,则下列重载形式中正确的是A.char

已知程序中已经定义了函数test,其原型是int test(int,int,int);,则下列重载形式中正确的是A.char

查看答案

有以下程序 #include<iostream> int i=0; void fun( ) { { static int i=1

有以下程序 #include<iostream> int i=0; void fun( ) { { static int i=1

查看答案

已知函数f的原型是:voidf(int*a,long &amp;B) ;,变量v1、v2;的定义是int v1;long v2;正确的调用语

已知函数f的原型是:voidf(int*a,long &amp;B) ;,变量v1、v2;的定义是int v1;long v2;正确的调用语

查看答案

有以下类定义 clas sMyClass { public: My Class() { cout<<1;} }; 则执行

有以下类定义 clas sMyClass { public: My Class() { cout<<1;} }; 则执行

查看答案