题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2023-10-23 16:09:55

[填空题]下面程序的执行结果是 【15】 #include <iostream> #include <iomanip> using namespace std; void main( ) { cout<<setfill(’x’)<<setw(10); cout<<"Hello"<<end1; }

更多"下面程序的执行结果是 【15】 #include <iostrea"的相关试题:

[填空题]下面程序执行的结果是 【14】
#include<iostream>
using namespace std;
class A
public:
static int x;
A(inty)cout<<x+y;

int A::x=2;
void main( )
A a(5);

[填空题]下面程序执行的结果是 【14】 #include<iostream> using namespace std; class A{ public: static int x; A(inty){cout<<x+y;} }; int A::x=2; void main( ){ A a(5); }
[填空题]下面程序的执行结果是 【15】
#include <iostream>
#include <iomanip>
using namespace std;
void main( )cout<<setfill(’x’)<<setw(10);
cout<<"Hello"<<end1;

[填空题]下面程序的执行结果是 【15】
#include <iostream>
#include <iomanip>
using namespace std;
void main( )

cout<<setfill(’x’)<<setw(10);
cout<<"Hello"<<end1;
[单项选择]下面程序执行后的结果是( )。
#include<iostream>
using namespace std;
void func1(int i);
void func2(int i);
char st[]="hello, friend!";
void func1(int i)
cout<<st[i];
if(i<3)i+=2;func2(i);

void func2(int i)
cout<<st[i];
if(i<3)i+=2;func1(i);

void main( )
int i=0;func1(i);cout<<endl;
A. ello
B. hel
C. hlo
D. him
[填空题]下面程序执行的结果是 【15】
#include <iostream>
using namespace std;
void main( )
int sum=0;
int array[6]=1,2,3,4,5,6;
int *p;
p=&array[0];
for(int i=0;i<6;i++)
sum=sum+*p;
p++;

cout<<sum;

[填空题]下面程序执行的结果是 【15】 。 #include <iostream> using namespace std; void main( ){ int sum=0; int array[6]={1,2,3,4,5,6}; int *p; p=&array[0]; for(int i=0;i<6;i++){ sum=sum+*p; p++; } cout<<sum; }
[单项选择]下面程序的执行结果是( )。 #include<iostream> using namespace std; class building { public: building( ) {} building(unsigned stories, float breadths, float lengths) { story = stories; breadth = breadths; length = lengths;} void getstory(void) { cout<<"story is:"<<story<<endl;} void getarea(void) { area = length*breadth*story;cout<<"area is:"<<area<<endl;} private: unsigned story; float length; float breadth; float area; }; void main(void) { building b1,b2;building b3(10u,16.6,58.8); b1.getstory( ); b1.getarea( ); b2.getstory( ); b2.getarea( ); b3.getstory( ); b3.getarea( );}
A. story is:0 area is:0 story is:0 area is:0 story is:10 area is:9760.8
B. story is:null area is:null story is:null area is:null story is:10 area is:9760.8
C. 前两个对象输出的结果是不定的,后一个对象的结果正确
D. 前两个对象没有初值,因此程序编译时出错
[填空题]下面程序的执行结果是______。
#include<iostream.h>
#include<iomanip.h>
using namespace std;
void main( )

cout<<setfill(’x’)<<setw(10);
cout<<"Hello"<<endl;

[填空题]下面程序的执行结果是 【15】 。 #include <iostream. h> void main( ) { int n=0,x=0; do { n++; if(n%3==2&&n%5==3&&n%7==2) x=1; }while(x!=1); cout<<"n=" <<n<<end1; }
[填空题]下面程序的执行结果是 【15】
#include <iostream.h>
void main( )

int n=0,x=0;
do

n++;
if(n%3==2&&n%5==3&&n%7==2)
x=1;
while(x!=1);
cout<<"n="<<n<<end1;

[单项选择]执行下面程序后输出的结果是( )。
#include <iostream>
using namespace std;
int main( )
int a[4][4]=1,2,3,-4,7,-12,-13,8,-21,9,0,-24,-31,10,-33,11;
int i,j,s=0;
for(i=0;i<4;i++)
for(j=0;j<4;j++)
if(a[i][j]>=0)continue;
s+=a[i][j];


coat<<s<<endl;
return 0;

A. 141
B. -138
C. -1
D. 75
[填空题]下面程序的执行结果是 【15】
#include <iostream. h>
void main( )int n=0,x=0;
don++;
if(n%3==2&&n%5==3&&n%7==2)
x=1;
while(x!=1);
cout<<"n=" <<n<<end1;

[填空题]下面程序的执行结果是 [7]
#include<iostream.h>
void main( )
int a=0,b=2,c=0,d=30;
if(
  • a)
    d=d-10;
    else if(B)
    if(!C)
    d=15;
    else d=20;
    cout<< “d=” <<d<<end1;

我来回答:

购买搜题卡查看答案
[会员特权] 开通VIP, 查看 全部题目答案
[会员特权] 享免全部广告特权
推荐91天
¥36.8
¥80元
31天
¥20.8
¥40元
365天
¥88.8
¥188元
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《购买须知》
立即支付 系统将自动为您注册账号
请使用微信扫码支付

订单号:

请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码