单项选择题
下面程序的结果为( )。 #include" iostream.h" void change(int a,int b) { int temp; temp=a; a=b; b=temp; } void main( ) { int m,n; m=8; n=9; change(m,n); tout < < m < < " " < < n < < end1; }
A. 8 9
B. 9 8
C. 程序有错误
D. 9 9
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
下列程序的运行结果是( )。# include <iostream.h>class A{int a;public:A( ) {a=0;}A(int aa){a=aa;cout << a++;}};void main( ){A x,y (2),z(3);cout << endl;}
A.0
B.23
C.34
D.25
点击查看答案&解析
单项选择题
下列程序的运行结果为( )。# include < iostream.h >voidprint (double a){cout << ++a;}void print (int a,int b){cout << b << a;}void main( ) {print (1.2);cout << ;print (3,4);}
A.1.2 34
B.2.2 34
C.1.2 43
D.2.2 43
点击查看答案&解析
相关试题
有以下程序:float f1(float n) { ...
有如下程序#includeusing namespace std...
有以下程序#include<iostream>using na...