填空题

下面程序的输出结果为 【10】 。 #inclUde<iostream.h> void main() { int a; int &b=a;//变量引用 b=10; cout<<"a="<<a<<endl; }

【参考答案】

a=10
<上一题 目录 下一题>
热门 试题

填空题
以下程序的执行结果是 【9】 。#include<iostream.h>template<class T>class Sample{T n;public:Sample(T i){n=i;)void operator();void disp(){cout<< n= <<n<<endl;)};template<class T>void Sample<T>::operator(){n=1; 不能用n;因为double型不能用}void main(){Sample<char>S(’a’);S;s.disp();}
填空题
如果表达式x=y*z中的“*”是作为成员函数重载的运算符,采用运算符函数调用格式,该表达式还可以表示为 【8】 。
相关试题
  • 下列程序的输出结果是 【13】 。#inCl...
  • 下列程序的运行结果为 【11】 。#incl...
  • 阅读下面程序:#include<iostream.h>vo...
  • 插入排序算法的主要思想是:每次从未排序序...
  • 以下程序的运行结果是 【12】 。#incl...