若有定义和语句int *point,a=4;point=&a;下面均代表地址的一组选项是()。
A.&a,&*point,point
B.a,point,*&a
C.&*a,&a,*point
D.*&point,*point,&a
A.&a,&*point,point
B.a,point,*&a
C.&*a,&a,*point
D.*&point,*point,&a
第2题
设计一个point(点)类: (1)该类具有成员变量x,y(表示点的横、纵坐标); (2)定义一个有参构造方法point(int x,int y),将其一对坐标值作为参数,其中x,y为给定坐标值; (3)定义一个无参的构造方法point()(令两坐标值均为0); (4)设计一个实例方法distance(point p1,point p2),实现求坐标轴上两个点的距离(Java中的开平方根函数为Math.sqrt()),其方法的声明为:double distance(point p1,point p2) 。 编写Test类,在其main方法中创建2个point对象,对应点(10,10)和点(20,25),再调用distance(point p1,point p2)方法计算出两点之间的距离并输出该值。
第3题
A.ptr1=&m;ptr2=&ptr1
B.ptr1=&m;ptr2=n;*ptr2=*ptr1
C.ptr1=&m;ptr2=ptr1
D.ptr1=&m;*ptr2=*ptr1
第5题
A、int mySpot;
B、spot mySpot=new spot()
C、spot mySpot=new spot();
D、B.spot mySpot=spot();
第7题
A.C语言程序必须要有return语句
B.C语言程序中,要调用的函数必须在main()中定义
C.C语言程序中,只有int类型的函数可以未经声明而出现在调用之后
D.C语言程序中,main()必须放在程序开始的部分
第8题
A.intQages=[100]
B.intages=newint[100]
C.int[ages=newint[100]
D.int()ages=newint(100)
第9题