单项选择题

下列程序段的输出结果是
#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
<上一题 目录 下一题>
热门 试题

单项选择题
下列程序的输出结果是 #include<iostream.h> void main() char*str= 12123434 ; int x1=0,x2=0,x3=0,x4=0,i; for(i=0;str[i]!=‘ 0’;i++) switch(str[i]) case’l’:x4++; case’2’:X3++; case’3’:x2++; case’4’:X1++; cout << X1 << , << x2 << ’ << x3 << , << X4;
A.8,6,4,1
B.8,6,3,2
C.8,8,4,1
D.8,6,4,2
单项选择题
有如下程序: #include iostream.h void main() int x=1,a=0,b=0; switch(x) case 0:b++; case 1:a++; case 2:a++;b++; cout << a= <<a << , << b= << b; 该程序的输出结果是
A.a=2,b=1
B.a=1,b=1
C.a=1,b=0
D.a=2,b=2
相关试题
  • 有如下程序 #include<iostream.h> vo...
  • 以下类定义中可能会引起错误的语句是 clas...
  • 有以下程序 #include iostream.h void...
  • 若运行时给变量x输入12,则以下程序的运...
  • 有如下程序: #include iostream.h vo...