在下面类的声明中,关于生成对象不正确的是:()
A: Pointp(10,2)
B: Point*p=newPoint(1,2)
C: Point*p=newPoint[2]
D: Point*p[2]={newPoint(1,2),newPoint(3,4)}
A: Pointp(10,2)
B: Point*p=newPoint(1,2)
C: Point*p=newPoint[2]
D: Point*p[2]={newPoint(1,2),newPoint(3,4)}
举一反三
- 有以下说明语句:structpoint{intx;inty;}p;则正确的赋值语句是() A: point.x=1;point.y=2; B: point={1,2}; C: p.x=1;p.y=2; D: p={1,2};
- <p>使用Point a[3]={Point(1,2),Point(3,4),Point()};时,系统调用了__次Point类的默认构造函数?</p>
- Pointp1=newPoint(18,20);//Point是structPointp2=p1;如果置p1.x=35;则p2.x也是35A.正确B.错误
- 有以下程序: point( char木p) p+=3; main() char a[4]='1','2','3','4',*p=a; point(p); printf("%c\n",*p); 程序运行后的输出结果是 A: A) 1 B: B) 2 C: C) 3 D: D) 4
- 设集合A={1,2},则P(A)= ____? A: {{1},{2}} B: {{1},{2},{1,2}} C: {∅,{1},{2},A} D: {∅,{1},{2}}