下列程序的输出结果是【 】
include<iostream>
using namespace std;
int main()
{
int num=500;
int &ref=num;
ref +=100;
cout<<num<<end1;
return 0;
}
第1题:
下列程序的输出结果是【 】
include<iostream>
using namespace std;
int &qetVar(int *pint)
{
renurn *pint;
}
int main ()
{
int a =10;
getVar(&a) = 20;
cout<<a<<end1;
return 0; }
第2题:
下列程序的输出结果是【 】
include<iostream>
using namespace std;
int &get Var(int*pint)
{
return *pint;
}
int main()
{
int a=10;
getvar(&A) =20;
cout<<a<<end1;
return 0;
}
第3题:
以下程序的输出结果是( )。 include<stdio.h> void swap(int*a,int*B){int*t; t=a;a=b;b=c;} main() {int i=3,j=5,*p=&i,*q=&j; swap(p,q);printf("%d %d\n",*p,*q); }
第4题:
下列程序段的输出结果是 #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
第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<<endl; }
A.2143
B.1212
C.1234
D.2112