题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2024-02-16 05:00:30

[单项选择]以下程序的输出结果是( )。
#include <iostream>
using namespace std;
int main( )

cout.fill('*');
cout.width(5);
cout<<hex<<100<<endl;
return 0;

A. **100
B. ***64
C. 100**
D. 64***

更多"以下程序的输出结果是( )。 #include <iostream"的相关试题:

[单项选择]以下程序的输出结果是( )。 #include <iostream> using namespace std; int main( ){ int a=1,b; switch(a){ case 1:b=30; case 2:b=20; case 3:b=10; default:b=0; } cout<<b<<endl; return 0; }
A. 30
B. 20
C. 10
D. 0
[填空题]以下程序的输出结果是 【8】
#include<iostream>
using namespace std;
int main( )
int sum,i;
for(sum=0,i=1;i<5;i++)sum+=i;
cout<<sum<<endl;
return 0;

[单项选择]下面程序输出的结果是( )。
#include <iostream>
using namespace std;
void swap(int &a,int &b)
int temp;
temp=a;
a=b;
b=temp;

void main( )
int x=2;
int y=3;
swap(x,y);
cout<<x<<y;

A. 23
B. 32
C. ab
D. ba
[单项选择]下列程序的输出结果是( )。
#include <iostream>
using namespace std;
int main( )

char a[]="Hello,World";
char *ptr=a;
while(*ptr)

if(*ptr>='a'&&*ptr<='z')
cout<<char(*ptr+'A'-'a');
else cout<<*ptr;
ptr++;

retur 0;

A. HELLO,WORLD
B. Hello,World
C. hELLO,world
D. hello,world
[单项选择]下面程序的输出结果是( )。
#include <iostream>
using namespace std;
void main( )

int s;
for(int k=2;k<6;k+=2)

s=1;
for(int j=k;j<6;j++) s+=j;

cout<<s<<endl;

A. 9
B. 1
C. 11
D. 10
[填空题]程序的输出结果是 【14】
#include <iostream>
using namespace std;
class A
int x;
public:
A(int x=1):x(x)cout<<x;

void main( )
A a,b(2),c(3);

[填空题]程序的输出结果是 【15】
#include <iostream>
using namespace std;
class A
public:
A( )a=b=2;
A(int i,int j)a=i;b=j;
void display( )cout<<a<<b;
private:
int a,b;

void main( )
A m,n(4,8);
m.display( );
n.display( );

[填空题]下面程序的输出结果是 【8】
#include<iostream>
using namespace std;
int x;
void funA(int&,int);
void funB(int,int&);
int main( )

int first;
int second=5;
x=6;
funA(first,seconD) ;
fimB(first,seconD) ;
cout<<first<<" "<<second<<" "<<x<<end1;
return 0;

void funA(int &a,int B)

int first;
first=a+b;
a=2*b;
b=first+4;

void funB(int u,int &v)

int second;
second=x;
v=second+4;
x=u+v;

[填空题]以下程序输出结果为______。
#include<iostream>
using namespace std;
class TestClass 1

public:
TestClass1( )
TestClass1(int i)
x1=i;
void dispa( )
cout<<"x1="<<x1<<",";
private:
int x1;
:
class TestClass2:public TestClass1

public:
TestClass2( )
TestClass2(int i):TestClass1(i+10)

x2=i:

void dispb( )

dispa( );
cout<<"x2="<<x2<<end1;

private:
int x2:
:
int main( )

TestClass2 b(2):
b.dispb( );
return 0;

我来回答:

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

订单号:

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