填空题

假定A为一个类,则语句A(A &a);为该类【 】函数的原型说明。

【参考答案】

拷贝构造
<上一题 目录 下一题>
热门 试题

单项选择题
有以下程序:#include struct STU{ int num;float TotalScore;};void f(struct STU p){struct STU s[2]={{20044,550},{20045,537}};p.num=s[1].num; p.TotalScore=s[1].TotalScore;}main(){ struct STU s[2]= {{20041,703},{20042,580}};f(s[0]);printf( %d %3.0f n ,s[0].num,s[0].TotalScore);}程序运行后的输出结果是______。
A.20045 537
B.20044 550
C.20042 580
D.20041 703
单项选择题
下面程序的输出结果是( )。# include <iostream.h>class example{int a;public:example (intb) {a=b++;}void print ( ){a=a+1; cout << a << ;}void print ( ) const {cout << a << ;}};void main ( ){example x (3);const example y (2);x. print ( );y.print ( );}
A. 2 2
B. 4 3
C. 4 2
D. 3 2
相关试题
  • 以下程序的输出结果是【 】。#include<i...
  • 下列for语句的循环次数为【 】。for(int...
  • operator是运算符重载时必须使用的关键字,...
  • C++语句const char * const p= he...
  • 已知字符A的ASCII码为 65,以下程序运行...