当变量X在奇偶数之间变化时,下列程序的输出结果为( )。 CLEAR X=0 DO WHILE X<6 IF INT(X/2)=X/2 ?"CHINA" ENDIF ?"中国" X=X+1 ENDDO
A.CHINA 中国 中国 连续显示3次
B.中国 中国 CHINA 连续显示3次
C.CHINA 中国 中国 连续显示2次
D.中国 中国 CHINA 连续显示2次
第1题:
下列程序段的输出结果是 #include<iostream.h> void fun(int * x,int * y) { cout << * X << * y; *X=3; *y=4; } void main() { int x=1,y=2; fun(&y,&x); cout << X << y<<endl; {
A.2143
B.1212
C.1234
D.2112
第2题:
下列程序段的输出结果是 #include<iostream.h> void fun(int*x,int*y) {cout<<*x<<*y; *X=3; *y=4; } void main() {int x=1,y=2; fun(&y,&x); cout<<X<<y<<endl; }
A.2143
B.1212
C.1234
D.2112
第3题:
用if语句判断int型变量x是否为偶数,以下语句正确的是()。
A.if(x == 2)
B.if(x % 2 == 0)
C.if(x % 2 = 0)
D.if(x/2 == 0)
第4题:
下列程序的输出结果是( )。 #include <stdio.h> void p(int *x) { printf("%d",++*x); } void main() { int y=3; p(&y); }
A.3
B.4
C.2
D.5
第5题:
下列程序段的输出结果是 #include<iostream.h> void fun(int * X,int * y) { cout < < * X < < * y; * X=3; * y=4; } void main( ) { int x=1,y=2; fun(&y,&x); cout < < X < < y < < end1; }
A.2143
B.1212
C.1234
D.2112