题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2024-03-23 05:55:58

[单项选择]有以下程序,其输出结果是( )。 #include <iostream> using namespace std; int main( ){ char a[10]={'1','2','3','4','5','6','7','8','9',0},*p; int i=8; p=a+i; cout<<p-3<<endl; return 0; }

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

[单项选择]运行以下的程序代码,结果是( )。 #include<iostream> using namespace std; intmain( ) { int x=5; int *q=&x; int &y=x; y++; tout<<(*q)++<<end1; return 0; }
A. 5
B. 6
C. 7
D. 8
[单项选择]以下程序的输出结果是 #include<iostream> using nameSpace std; int main( ) { cout.fill('*'); cout.width(5); cout<<hex<<100<<end1; return 0; }
A. **100
B. ***64
C. 100**
D. 64***
[单项选择]以下程序输出结果是( ): #include<iostream> using namespace std; void add(int X,int y,int *z) { *z=y+x; } int main( ) { int a,b,c; add(8,4,&a); add(6,a,&b); add(a,b,&c); cout<<a<<","<<b<<","<<c<<end1; return 0;
A. 12,10,14
B. 12,18,30
C. 12,6,18
D. 12,14,30
[单项选择]以下程序的输出结果是
#include <iostream>
using namespace std;
int main( ) cout.fill('*');
cout.width(5);
cous<<hex<<100<<end1;
return 0;

A. **100
B. ***64
C. 100**
D. 64***
[单项选择]以下程序的执行结果是 ( )。
#include <iostream>
using namespace std;
class sample

private:
int x;
public:
sample (int
A. 30
B. 900
C. 400
[单项选择]以下程序输出的结果是( )。 #include<iostream> using namespace std; int main( ) { int **x,*y,z=10; y=&z; x=&y; cout<< **x+1<<endl; return 0; }
A. 11
B. x的地址
C. y的地址
D. 运行错误
[单项选择]以下程序的输出结果是( )。 #include<iostream> using namespace std; void fun(char**q) { ++q; cout<<*q<<end1; } main( ) { static char*s[]={"HI","HELL0","TEST"}; char**p; p=s; fun(p); system("PAUSE"); return 0; }
A. 为空
B. HI
C. HELL0
D. TEST
[单项选择]对下列程序的描述正确的是( )。 #include <iostream> using namespace std; int fuc(int,int); int main( ){ cout<<fuc(1,10)<<endl; return 0; } int fuc(int x,int y){ return x*x+y*y; }
A. 该函数的定义和调用方式都是错误的
B. 该函数的定义和调用方式都是正确的
C. 该函数调用方式正确,但函数定义错误
D. 函数定义正确,但函数调用方式错误
[单项选择]对下面的程序,说法正确的是( )。 #include<iostream> using namespace std; void sum(float m, float n) { float sum=m+n; } main( ) { cout<<sum(5.3,6.5)<<endl;}
A. 该程序是错误的,错误之处在于没有对sum()函数进行说明
B. 程序书写规整,无语法错误,是正确的
C. 该程序语法无错误,但在调用函数sum()时出错,因为sum()函数被定义为viod类型,但却被主函数调用,因而是错误的
D. 虽然sun()函数被定义为void类型,但调用时也不会出错,程序能够编译通过
[单项选择]如下程序的输出结果是
#include<iostream>
using namespaee std;
int main( )
eout.fill('*');
eout.width(6);
cout.fill('#'):
eout<(123<endl:
return 0;

A. ###123
B. 123###
C. ***123
D. 123***
[单项选择]如下程序的输出结果是 #include<iostream> using namespaee std; int main( ){ eout.fill('*'); eout.width(6); cout.fill('#'): eout<(123<endl: return 0; }
A. ###123
B. 123###
C. ***123
D. 123***
[单项选择]如下程序的输出结果是 #include<iostream> using namespace std; class A{ public: A( ){cout<<"A";} }; class B{public:B( ){cout<<"B";}}; class C://public A{ B b; public: C( ){cout<<"C";} }; int main( ){C obj;return 0;}
A. CBA
B. BAC
C. ACB
D. ABC
[单项选择]下列程序的输出结果是 #include"iostream" using namespace std; int Max(int a,int b) { if (a > b) return a; else return b; } void main( ) { int m,n; m=10,n=5; int max=Max(m,n); cout<<max<<endl; }
A. 10
B. 程序有误
C. 1
D. 0

我来回答:

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

订单号:

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