更多"下面程序的运行结果为 #include < iostream.h >"的相关试题:
[单项选择]下面程序的运行结果为
#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,3 B) 3,2 C) 2,2 D) 3,3
[单项选择]下面程序的运行结果为
#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,3 B) 3,2 C) 2,2 D) 3,3
[单项选择]下面程序的运行结果为
#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,3
B. 3,2
C. 2,2
D. 3,3
[单项选择]下面程序的运行结果为( )。
#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,3
B. 3,2
C. 2,2
D. 3,3
[单项选择]下面程序的运行结果为( )。
#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,3
B. 3,2
C. 2,2
D. 3,3
[填空题]以下程序运行后输出结果是 【18】 。
#include <stdio, h>
void swap(int x.int y)
int t;
t = x;x = y;y = t: printf( "% d % d ",x,y);main ( )
iht a=3,b=4:
swap(a,b); prinff( "% d % d" ,a,b);
[填空题]以下程序的输出结果是 【10】 。
#include <stdio.h>
void swap(int *a, int *b)
{ int *t;
t=a; a=b; b=t;
}
main( )
{ int i=3,j=5,*p=&i,*q=&j;
swap(p,q); printf("%d %d/n",*p,*q);
}
[填空题]下列程序的输出结果是 【11】 。
#include <stdio.h>
void swap(int *a, int *B)
{
int *t;
t=a;a=b;b=t;
}
main( )
{
int i=3,j=5,*p=&i,*q=&j;
swap(p,q);printf("%d %d/n",*p,*q);
}
[填空题]下列程序的输出结果是 。
#include <stdio.h>
void swap(int *a, int *B)
int *t;
t=a;a=b;b=t;
main( )
int i=3,j=5,*p=&i,*q=&j;
swap(p,q);printf("%d %d//n",*p,*q);
[填空题]以下程序的输出结果是______。
#include <stdio.h>
void swap(int *a, int *b)
{ int *t;
}
{ int i=3,j=5,*p=&i,*q=&j;
swap(p,q); printf("%d %d/n",*p,*q);