题目内容

执行以下语句后的输出结果是( )。enun weekday {sun, mon, tue, wed = 4, thu,fri,sat};weekday workday = mon;cout << workday + wed << endl ;

A. 6
B. 5
C. thu
D. 编译错

查看答案
更多问题

#include 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++;}return 0;}

A. HELLO,WORLD
B. Hello,World
C. Hello,world
D. hello,world

int main(){char w[][10] ={"ABCD","BFGH","IJKL","MNOP"},k;for(k=1;k<3;k++) cout <

ABCDFGH KL M
B. ABCDEFGIJ
C. EFGJK O
D. EFGHIJKL

若“int i=100;”,在下列引用方法中,正确的是( )。

A. int &r=i;
B. int &r=100;
C. int &r;
D. int &r=&i;

以下程序的执行结果为( )。int f(int i){return ++i;}int g(int &i){return ++i;}int main(){int a(0),b(0);a+=f(g(a));b+=f(f(b));cout << a<<"\t"<< b;return 0;}

A. 3 2
B. 2 3
C. 3 3
D. 2 2

答案查题题库