网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

下面程序的运行结果为( )。#include<iostream.h>

voidswap(int&a,intb)

{

int temp;

temp=a++;

a=b:

b=temp:

}

voidmain()

{

inta=2,b=3;

swap(a,b);

cout<<a<<","<<b<<endl;

}

A.2,3

B.3,2

C.2,2

D.3,3

A.2,3

B..3,2

C.2,2

D.3,3


参考答案

更多 “ 下面程序的运行结果为( )。#includeiostream.hvoidswap(int&a,intb){int temp;temp=a++;a=b:b=temp:}voidmain(){inta=2,b=3;swap(a,b);couta,bendl;}A.2,3B.3,2C.2,2D.3,3A.2,3B..3,2C.2,2D.3,3 ” 相关考题
考题 下面程序的运行结果为#includevoid swap(int a,int b{int temp;temp=a++;a=b;b=temp;}void main(){int a=2,b=3;swap(a,b):cout }A.2,3B.3,2C.2,2D.3,3

考题 下面程序的运行结果为 include void swap(int a, int b) { int temp; temp=a 下面程序的运行结果为#include<iostream.h>void swap(int a, int b){int temp;temp=a++;a=b;b=temp;}void main( )int a=2,b=3;swap(a, b) ;cout < < a < <"," < < b < < endl;}A.2,3B.3,2C.2,2D.3,3

考题 下面程序的运行结果为()。includevoid swap(int a,int B) {int temp;temp=a++; 下面程序的运行结果为( )。 #include<iostream.h> void swap(int a,int B) { int temp; temp=a++; a=b; b=temp; } void main() { int a=2,b=3; swap(a,b); cout<<a<<“,”<<b<<end1; }A.2,3B.3,2C.2,2D.3,3

考题 下面程序的运行结果为( )。#includeiostream.h voidswap(int&a,intb) { inttemp; temp=a++; a=b: b=temp: } voidmain() { inta=2,b=3; swap(a,b); couta","bendl; }A.2,3B.3,2C.2,2D.3,3

考题 下面程序输出的结果是( )。 include using namespace std; void swap(int 下面程序输出的结果是( )。 #include <iostream> using namespace std; void swap(int a,int b){ int temp; temp=a; a=b; b=temp; } void main(){ int x=2; int y=3; swap(x,y); cout<<x<<y; }A.23B.32C.abD.ba

考题 下面程序的运行结果为( )。 #includeiostream.h void swap(int&a,int B. int temp; temp=a++: a=b: b=temp; } void main { im a=2,b=3; swap(a,B.; eouta”,”bendl; }A.2,3B.3,2C.2,2D.3,3

考题 下面程序的运行结果为includeVoid swap(int a,int b){int temp;temp=a++;a=b; 下面程序的运行结果为 #include<iostream,h> Void swap(int a,int b) { int temp; temp=a++; a=b; b=temp; } void main() { int a=2,b=3; swap(a,b); cout <<a <<”,” <<b <<end1 }A.2,3B.3,2C.2,2D.3,3

考题 下面程序的运行结果为( )。 include using namespace std; void swap(int a,int b){ int temp; temp=a; a=b; b=temp; } void main(){ int a=2,b=3; swap(a,b); cout<<a<<"," <<b<<ENDL; }A.2,3B.3,2C.2,2D.3,3

考题 下面程序的运行结果为()。includevoid swap (int a, int b){int temp;temp=a++ 下面程序的运行结果为( )。#include<iostream.h>void swap (int a, int b){int temp;temp=a++;a=b;b=temp;}void main(){int a=2, b=3;swap(a,b);cout<<a<<","<<b<<end1;}A.2,3B.3,2C.2,2D.3,3