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

admin2013-05-30  18

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

选项

答案*****hello

解析 本题考查的是C++语言的流输出操作,cout中包括的函数fill()和width()分别实现填充和设定显示长度的功能。
转载请注明原文地址:https://kaotiyun.com/show/cGNp777K
0

最新回复(0)