单项选择题

下列程序输出的结果是( )。
#include<stdio.h>
fun1(char a,char b) char c;c=a;a=b;b=c;
fun2(char*a,char b) char c;c=*a;*a=b;b=c;
fun3(char*a,char*b) char c;c=*a;*a=*b;*b=c;
void main()

char a,b;
a=’A’;b=’B’; fun1 (a,b);putchar(

A.;putchar(
B.;
a=’
<上一题 目录 下一题>
热门 试题

单项选择题
下列程序的输出结果是______。 #include<iostream> using namespace std; class Test( public: Test() cnt++; ~Test() cnt--; static int Count()return cnt; private: static int cnt; ; int Test::cnt=0; int main() cout<<Test::Count()<< ; Test t1,t2; Test*pT3=new Test; Test*pT4=new Test; cout<<Test::Count()<< ; delete pT4; delete pT3; cout<<Test::Count()<<end1; return 0;
A.024
B.042
C.420
D.240
单项选择题
若有如下程序: #include<iostream> using namespaee std; int fun() static int i=0; int s=1; s+=i; i++; return s; int main() int i,a=0; for(i=0;i<5;i++) a+=fun(); cout<<a<<end1; return 0; 程序运行后,输出的结果是( )。
A.20
B.24
C.25
D.15
相关试题
  • 软件是程序、数据和______的集合。
  • 下列类定义中包含了构造函数和拷贝构造函数...
  • 非成员函数应声明为类的______函数才...
  • 若下列程序运行时输出结果为 1,A,10...
  • 己知下列程序的输出结果是42,请将横线处...