执行下面程序后,输出为( )。
void fun(int a, int &b, int *c){
a += 1;
b += 2;
*c += 3;
}
int main(){
int x = 1, y = 1, z = 1;
fun(x, y, &z);
cout << x << " " << y << " " << z;
}
- A.
2 3 4 - B.
1 3 4 - C.
2 1 4 - D.
1 1 1
g4-04077.in输出g4-04077.out执行下面程序后,输出为( )。
void fun(int a, int &b, int *c){
a += 1;
b += 2;
*c += 3;
}
int main(){
int x = 1, y = 1, z = 1;
fun(x, y, &z);
cout << x << " " << y << " " << z;
}
2 3 41 3 42 1 41 1 1