下列程序的输出结果是( )。
#include <iostream>
using namespace std;
int main( )
char a[]="Hello,World";
char *ptr=a;
while(*ptr)
if(*ptr>='a'&&*ptr<='z')
cout<<char(*ptr+'A'-'a');
else cout<<*ptr;
ptr++;
retur 0;
题库:计算机等级考试
类型:最佳选择题
时间:2017-07-03 14:23:32
免费下载:《单项选择》Word试卷
下列程序的输出结果是( )。
#include <iostream>
using namespace std;
int main( )
char a[]="Hello,World";
char *ptr=a;
while(*ptr)
if(*ptr>='a'&&*ptr<='z')
cout<<char(*ptr+'A'-'a');
else cout<<*ptr;
ptr++;
retur 0;
A.HELLO,WORLD
B.Hello,World
C.hELLO,world
D.hello,world
本题关键词:输出结果,出院病案排列顺序,竣工结算程序,结果,序列关系,空间序列,肝糖输出,输出浓度,程序,结果均;