答案查看网,轻松搜题/搜资源
登录
×
登录账号
记住密码
立即注册
忘记密码
×
注册
使用微信扫描二维码,获取账号密码后免费查看答案
前往登录
忘记密码
×
忘记密码
使用微信扫描下方二维码,即可找回您的账号密码
前往登录
立即注册
搜题/搜资源
【单选题】【消耗次数:1】
有说明语句int a[10];及函数int fun(int x[10],int n){return sizeof(x);},则语句cout<<fun(a,10)<<endl;的显示结果是()
①
40
②
10
③
4
④
0
参考答案:
复制
纠错
相关题目
【单选题】
有说明语句int b[4][5];void fun(int*,int n);调用函数的正确语句是()
①
fun(b,20);
②
fun(b[0],20);
③
fun(b[0][0],20);
④
fun(b,20);
查看完整题目与答案
【单选题】
有以下程序,程序执行后的输出结果是( ) #include int fun(int x [ ],int n) { static int sum=0,i; for(i=0; i{ sum+=x[i]; } return sum; } void main( ) { int a[ ]={1,2,3,4,5}; int b[ ]={6,7,8,9},s=0; s=fun(a,5)+fun(b,4); printf(%d\n,s); }
①
45
②
50
③
60
④
66
查看完整题目与答案
【单选题】
有说明语句int *p=new int[10];访问动态数组元素的正确语句是()
①
int a=p;
②
int a=*p;
③
delete int[]p
④
delete p int[10]
查看完整题目与答案
【单选题】
下面程序的输出是 int fun3(int x) {static int a=3; a+=x; return(a); } void main() {int k=2,m=1,n; n=fun3(k); n=fun3(m); printf(%d\n }
①
3
②
4
③
6
④
9
查看完整题目与答案
【单选题】
若有定义int*x[3],b[10];则正确的赋值语句是()
①
x=b[0];
②
x=b;
③
x[0]=b[0];
④
x[0]=b[0];
查看完整题目与答案
【单选题】
下列程序的输出结果是()。 #include fun(int *a,int *b) {int *w;*a=*a+*a;*w=*a; *a=*b; *b=*w;} main( ) {int x=9,y=5,*px=fun(px,py);printf(%d, %d\n,x,y);}
①
出错
②
18,5
③
5,9
④
5,18
查看完整题目与答案
【单选题】
下面程序的输出结果是()。 #include int num=10; func( ) {int num=4; return ++num; } void main( ) { printf(%d\n, func( ) ) ; }
①
4
②
5
③
10
④
11
查看完整题目与答案
【单选题】
下列语句中,将函数int sum(int x, int y)正确重载的是( )。
①
float sum(int x, int y);
②
int sum(int a, int b);
③
float sum(float x, float y);
④
double sum(int y, int x);
查看完整题目与答案
【单选题】
下列语句中,将函数int sum(int x, int y)正确重载的是( )。
①
float sum(int x, int y);
②
int sum(int a, int b);
③
float sum(float x, float y);
④
double sum(int y, int x);
查看完整题目与答案
【单选题】
执行完以下代码int [ ] x = new int[10];后,以下哪项说明是正确的( )
①
x[9]为0
②
x[9]未定义
③
x[10]为0
④
x[0]为空
查看完整题目与答案
随机题目
【单选题】
I _______ sleep very well, but then I started doing yoga and it really helps.
①
didn’t use to
②
used to
③
was used to
④
wasn’t used to
查看完整题目与答案
【单选题】
The cover of the book _______ comfortable. It’s made of silk.
①
tastes
②
feels
③
looks
④
sounds
查看完整题目与答案
【单选题】
_______ smart the driverless car is!
①
What a
②
How a
③
What
④
How
查看完整题目与答案
【单选题】
Last month, the little girl _______ well enough by the neighbors while her parents were volunteering.
①
is cared for
②
was cared for
③
will be cared for
④
cares for
查看完整题目与答案
【单选题】
______ a year does your school have sports meeting?Twice a year.
①
How often
②
How soon
③
How long
④
How many times
查看完整题目与答案
【单选题】
Don’t worry. We have _______ to finish the work carefully.
①
enough time
②
less time
③
little time
④
few times
查看完整题目与答案
【单选题】
______ either you or I good at drawing?
①
Am
②
Are
③
Is
④
Do
查看完整题目与答案
【单选题】
The room ______ as a meeting room.
①
used to being used
②
was used to being used
③
used to be used
④
was used to be used
查看完整题目与答案
【单选题】
Don’t _______ our hopes. As long as we pull together, we’ll make it.
①
give up
②
give out
③
give back
④
give away
查看完整题目与答案
【单选题】
Every morning, Tim often sees groups of middle-aged women _______ in the square.
①
dance
②
to dance
③
dances
④
danced
查看完整题目与答案