單項(xiàng)選擇題若有說明class X{int a;void fun1();public:void fun2();};X objX;,則在類外使用對(duì)象objX成員的正確語句是()

A.objX.a=0;
B.objX.fun1();
C.objX.fun2();
D.X::fun1();


您可能感興趣的試卷

你可能感興趣的試題

1.單項(xiàng)選擇題下列類的定義中正確的是()

A.class a{int x=0;int y=1;}
B.class b{int x=0;int y=1;};
C.class c{intx;int y;}
D.class d{intx;int y;};

2.單項(xiàng)選擇題刪除*(head->next)的操作是()

A.p=head->next;head->next=head->next->next;delete p;
B.head->next=head->next->next;p=head->next;delete p;
C.p=head;head=head->next;delete p;
D.head=head->next;p=head;delete p;

3.單項(xiàng)選擇題刪除*p節(jié)點(diǎn)的操作是()

A.q=p;delete p;
B.p=q;delete q;
C.q->next=p->next;delete p;
D.p->next=q->next;delete q;

4.單項(xiàng)選擇題*hear之前插入節(jié)點(diǎn)*s的操作是()

A.s->next=head;head=s;
B.s->next=head->next;head->next=s;
C.head=s;s->next=head;
D.head->next=s;s->next=head->next;

5.單項(xiàng)選擇題*p之前插入節(jié)點(diǎn)*s的操作是()

A.q=s->next;s=p->next;
B.q->next=s;s->next=p;
C.s=p->next;q=s->next;
D.s->next=p;q->next=s;