题目内容
(请给出正确答案)
[主观题]
设一个链式队列q的队头指针和队尾指针分别为(ront和rear,则判断队列空的条件是()。
设一个链式队列q的队头指针和队尾指针分别为(ront和rear,则判断队列空的条件是()。
A、q.front==q.rear
B、q.front==NULL
C、q.rear==NULL
D、q.front!==NULL
答案
查看答案
A、q.front==q.rear
B、q.front==NULL
C、q.rear==NULL
D、q.front!==NULL
第2题
A.front->next=s;front=s;
B.s->next=rear;rear=s;
C.rear->next=s;rear=s;
D.s->next=front;front=s;
第3题
假定一个循环队列的队头和队尾指针分别为P和q,则判断队空的条件为_________。
A.p==0
B.p+1==q
C.q+1==p
D.p==q
第6题
已知链队列Q的头、尾指针分别是front和rear,则出队操作是:p=Q一>front;_______;free(p)。
第10题
若链队列的队头指针和队尾指针分别为front和rear,则从队列中删除一个结点的操作是_______。
A.p=front;rear=p一>next;free(p);
B.p=rear;front=p;free(p);
C.p=front;front=P一>next;free(p);
D.p=rear;front=P一>next;free(p);
第11题
A.7和1
B.1和7
C.5和1
D.1和5