单项选择题

下列程序的输出结果是( )。
#include<iostream>
using namespace std;
int main()
于
chara[]=”Hello,Test”;
Char*p=a;
while(*p)
if(*p)=’a’&&*p(=’z’)
cout<<char(*p+’A’-’a’);
else cout<<*p;
p++;
return 0;

A.hello,test
B.Hello,Test
C.HELLO,TEST
D.hELLO,tEST
<上一题 目录 下一题>
热门 试题

单项选择题
下列程序的执行结果是( )。 #include<iostream.h> class Sample int x,y; public: Sample()x=y=0;) Sample(int a,int b)x=a;y=b; ~Sample() if=(x==y) cout<<“x=y”<<endl; else cout<<“x!=y”<<endl; void disp() cout<<“x=”<<x<<“,y=”<<y<<endl; ; void main() Sample s1(2,3); s1.disp();
A.x=2,y=2
B.x=3,y=3
C.x=2,y=3
D.x=3,y=2
单项选择题
有如下程序: #include<iostream> using namespace std; Class Test public: Test() n+=2; ~Test() n-=3; static int getNum() return n; private: static int n; ; int Test::n=1; int main() Test*p=new Test; delete p; cout<<“n=”<<Tes::getNum()<<endl; return 0; 执行后的输出结果是( )。
A.n=0
B.n=1
C.n=2
D.n=3
相关试题
  • 下列程序的运行结果为( )。 #include...