填空题

下列程序的执行结果为【 】。   #include<iostream.h>   void main( )   {     cout.fill( ’’ * ’’ );     cout.width(10);     cout<<"hello"<<endl;   =

【参考答案】

* * * * * hello
<上一题 目录 下一题>
热门 试题

单项选择题
下面程序的输出结果是( )。# 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. (operator++(x) ).operator/(y)
B. (operator++(0) ).operator/(y)
C. operator/( (operator++(x,0) ),y)
D. operator/( (operator++(0) ),y)
单项选择题
下列程序的输出结果是( )。#include<iostream.h>class Myclass {public:Myclass(int i=0,intj=0){ x=i;y=j;}void show( ) { cout < < x= < < x < < < y= < < y < < end1;}void show( )const { cout < < x= < < < < y=’’ < < y < < end1;}privated:int x; int y;};void main( ){ Myclass my1(3,4);const my2(7,8);my1.show( );my2.show( );}
A. x=4,y=3;x=7,y=8
B. x=3,y=4;x=7,y=8
C. x=7,y=8;x=4,y=3
D. x=8,y=7;x=7,y=8
相关试题
  • 当循环队列非空且队尾指针等于队头指针时,...
  • 若串s= MathTypes ,则其子串的数目是【...
  • 当数据的物理结构(存储结构、存取方式等)...
  • 可以把具有相同属性的一些不同对象归类,称...
  • 数据的逻辑结构有线性结构和【 】两大类。