更多"下列程序的输出结果是( )。 #include<iostream>"的相关试题:
[单项选择]下面的程序输出结果是( )。 #include<iostream> using namespace std; void add( ) { static int x; x++; cout<<x<<''; } int main( ) { for(int i=0;i<3;i++) add( ); return 0; }
A. 111
B. 123
C. 222
D. 333
[单项选择]以下程序输出的结果是( )。 #include<iostream> using namespace std; int main( ) { int **x,*y,z=10; y=&z; x=&y; cout<< **x+1<<endl; return 0; }
A. 11
B. x的地址
C. y的地址
D. 运行错误
[单项选择]下面程序输出的结果是( )。 #include<iostream> using namespace std; void main( ) { char ch[][8]={"good","better","best"}; for(int i=1;i<3;++i) { cout<<ch[i]<<endl; } }
A. good better
B. better best
C. good best
D. good
[单项选择]下列程序的输出结果是( )。 #include<iostream> using namespace std; int main( ) { char a[]="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> using namespace std; void fun(char**q) { ++q; cout<<*q<<end1; } main( ) { static char*s[]={"HI","HELL0","TEST"}; char**p; p=s; fun(p); system("PAUSE"); return 0; }
A. 为空
B. HI
C. HELL0
D. TEST
[单项选择]下面程序的输出结果是( )。 #include<iostream> using namespace std; void main( ) { char cl='a',c2='c'; cout.put('a').put('c').put('/n'); cout.put(c1).put(c2); }
A. ac a c
B. ac ac
C. a c ac c
D. a c