删除*p节点的操作是()A、q=p;delete p;B、p=q;delete q;C、q-next=p-next;delete p;D、p-next=q-next;delete q;

删除*p节点的操作是()

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

相关考题:

在一个单链表head中,若要在指针p所指结点后插入一个q指针所指结点,则执行() A.p-next=q-next;q-next=p;B.q-next=p-next;p=q;C.p-next=q-next;p-next=q;D.q-next=next;p-next=q;

若有以下定义则不能将指针q所指的结点接到链表末尾的程序段是()。 A.q-next=NULL;p=p-next;p-next=qB.p=p-next;q-next=p-next;p-next=qC.p=p-next;q-next=p;p-next=qD.p=(*p).next;(*q).next=(*p).next;(*p).next=q

若有以下定义:则不能将q所指向的结点连到上图所示链表末尾的一组语句是() A.q-next=NULL;p=p-next;p-next=qB.p=p-next;q-next=p;p-next=qC.p=p-next;q-next=p-next;p-next=qD.p=(*p).next;(*q).next=(*p).next;(*p).next=q

在一个单链表head中,若要在指针p所指结点后插入一个q指针所指结点,则执行()A、p-next=q-next;q-next=p;B、q-next=p-next;p=q;C、p-next=q-next;p-next=q;D、q-next=next;p-next=q;

在一个单链表中,已知q结点是p结点的前趋结点,若在q和p之间插入s结点,则须执行()A、s-next=p-next;  p-next=s B、q-next=s;  s-next=p C、p-next=s-next;  s-next=p D、p-next=s;  s-next=q

在一个单链表中,已知q所指结点是p所指结点的前驱结点,若在q和p之间插入一个结点s,则执行()。A、s-next=p-next;p-next=s;B、p-next=s-next;s-next=p;C、q-next=s;s-next=p;D、p-next=s;s-next=q;

在一个单链表HL中,若要删除由指针q所指向结点的后继结点,则执行()A、p=q-next;p-next=q-next;B、p=q-next;q-next=p;C、p=q-next;q-next=p-next;D、q-next=q-next-next;q-next=q;

在双向循环链表中,在p指针所指的结点后插入一个指针q所指向的新结点,修改指针的操作是()。A、p-next=q;q-prior=p;p-next-prior=q;q-next=q;B、p-next=q;p-next-prior=q;q-prior=p;q-next=p-next;C、q-prior=p;q-next=p-next;p-next-prior=q;p-next=q;D、q-next=p-next;q-prior=p;p-next=q;p-next=q;

在非空线性链表中由p所指的结点后面插入一个由q所指的结点的过程是依次执行语句:q-next=p-next;p-next=q。

在一个单链表中,已知q所指结点是p所指结点的直接前驱,若在q和p之间插入s所指结点,则执行()操作。A、s-next=p-next;p-next=s;B、q-next=s;s-next=p;C、p-next=s-next;s-next=p;D、p-next=s;s-next=q;

在双向循环链表中,在p指针所指的结点后插入q所指向的新结点,其修改指针的操作是()。A、p-next=q; q-prior=p; p-next-prior=q; q-next=q; B、p-next=q; p-next-prior=q; q-prior=p; q-next=p-next; C、q-prior=p; q-next=p-next; p-next-prior=q; p-next=q; D、q-prior=p; q-next=p-next; p-next=q; p-next-prior=q;

在一个单链表中p指向结点a,q指向结点a的直接后继结点b,要删除结点b,可执行()。A、p-next=q-next;B、p=q-next;C、p-next=p;D、p-next=q;

在一个单链表HL中,若要在指针q所指的结点的后面插入一个由指针p所指的结点,则执行()A、q-next=p-next;p-next=q;B、p-next=q-next;q=p;C、p-next=q-next;q-next=p;

在一个单链表中,p、q分别指向表中两个相邻的结点,且q所指结点是p所指结点的直接后继,现要删除q所指结点,可用语句()。A、p-next=q-nextB、p=q-nextC、q-next=NULLD、p-next=q

非空双向循环链表中由q所指的结点后面插入一个由p指的结点的动作依次为:p-prior=q,p-next=q-next,q-next=p,q-prior-next←p。

已知L是带表头结点的非空单链表,且P结点既不是首元结点,也不是尾元结点,试从下列提供的答案中选择合适的语句序列。 a.删除P结点的直接后继结点的语句序列是()。 b.删除P结点的直接前驱结点的语句序列是()。 c.删除P结点的语句序列是()。 d.删除首元结点的语句序列是()。 e.删除尾元结点的语句序列是()。 (1)P=P-next; (2)P-next=P; (3)P-next=P-next-next; (4)P=P-next-next; (5)while(P!=NULL)P=P-next; (6)while(Q-next!=NULL){P=Q;Q=Q-next;} (7)while(P-next!=Q)P=P-next; (8)while(P-next-next!=Q)P=P-next; (9)while(P-next-next!=NULL)P=P-next; (10)Q=P; (11)Q=P-next; (12)P=L; (13)L=L-next; (14)free(Q);

在*p之前插入节点*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;

单选题在一个单链表head中,若要在指针p所指结点后插入一个q指针所指结点,则执行()Ap-next=q-next;q-next=p;Bq-next=p-next;p=q;Cp-next=q-next;p-next=q;Dq-next=next;p-next=q;

单选题在一个单链表HL中,若要在指针q所指的结点的后面插入一个由指针p所指的结点,则执行()Aq-next=p-next;p-next=q;Bp-next=q-next;q=p;Cp-next=q-next;q-next=p;

判断题非空双向循环链表中由q所指的结点后面插入一个由p指的结点的动作依次为:p-prior=q,p-next=q-next,q-next=p,q-prior-next←p。A对B错

判断题在非空线性链表中由p所指的结点后面插入一个由q所指的结点的过程是依次执行语句:q-next=p-next;p-next=q。A对B错

单选题设指针变量p指向单链表中结点A,若删除单链表中结点A,则需要修改指针的操作序列为( )。Aq=p-next;p-data=q-data;p-next=q-next;free(q);Bq=p-next;q-data=p-data;p-next=q-next;free(q);Cq=p-next;p-next=q-next;free(q);Dq=p-next;p-data=q-data;free(q);

单选题在一个单链表HL中,若要删除由指针q所指向结点的后继结点,则执行()Ap=q-next;p-next=q-next;Bp=q-next;q-next=p;Cp=q-next;q-next=p-next;Dq-next=q-next-next;q-next=q;

单选题在*p之前插入节点*s的操作是()Aq=s-next;s=p-next;Bq-next=s;s-next=p;Cs=p-next;q=s-next;Ds-next=p;q-next=s;

单选题在双向循环链表中,在p指针所指的结点后插入q所指向的新结点,其修改指针的操作是()。Ap-next=q; q-prior=p; p-next-prior=q; q-next=q; Bp-next=q; p-next-prior=q; q-prior=p; q-next=p-next; Cq-prior=p; q-next=p-next; p-next-prior=q; p-next=q; Dq-prior=p; q-next=p-next; p-next=q; p-next-prior=q;

单选题在双向循环链表中,在p指针所指的结点后插入一个指针q所指向的新结点,修改指针的操作是()。Ap-next=q;q-prior=p;p-next-prior=q;q-next=q;Bp-next=q;p-next-prior=q;q-prior=p;q-next=p-next;Cq-prior=p;q-next=p-next;p-next-prior=q;p-next=q;Dq-next=p-next;q-prior=p;p-next=q;p-next=q;

单选题删除*p节点的操作是()Aq=p;delete p;Bp=q;delete q;Cq-next=p-next;delete p;Dp-next=q-next;delete q;