单选题:有下列程序: #include<stdi0.h>#include<stdlib.h>intfun(intn){int*P

  • 题目分类:C++
  • 题目类型:单选题
  • 查看权限:VIP
题目内容:
有下列程序:
#include<stdi0.h>
#include<stdlib.h>
intfun(intn)
{int*P;
p=(int*)malloc(sizeof(int));
*P=n;return*P;
}
voidmain(  )
{inta;
a=fun(10);printf("%d\n",a+fun(10));}
程序的运行结果是(  )。 A.0
B.10
C.20
D.出错

参考答案:
答案解析:

若有定义语句“doublex[5]={1.0,2.0,3.0,4.0,5.0},*p=x”,则错误引用X数组元素的是( 

若有定义语句“doublex[5]={1.0,2.0,3.0,4.0,5.0},*p=x”,则错误引用X数组元素的是(  )。 A.*p B.x[5] C.*(

查看答案

若有表达式“(w)?(--x):(++y)”,则其中与w等价的表达式是(  )。

若有表达式“(w)?(--x):(++y)”,则其中与w等价的表达式是(  )。 A.w==1 B.w==0 C.W!=1 D.W!=0

查看答案

在数据管理技术发展的3个阶段中,数据共享最好的是(  )。

在数据管理技术发展的3个阶段中,数据共享最好的是(  )。 A.人工管理阶段 B.文件系统阶段 C.数据库系统阶段 D.3个阶段相同

查看答案

在面向对象方法中,不属于“对象”基本特点的是(  )。

在面向对象方法中,不属于“对象”基本特点的是(  )。 A.一致性 B.分类性 C.多态性 D.标识唯一性

查看答案

They didn’t tell me_________my problem was,except that the j

They didn’t tell me_________my problem was,except that the job wasn’t good for m

查看答案