答案查看网,轻松搜题/搜资源
登录
×
登录账号
记住密码
立即注册
忘记密码
×
注册
使用微信扫描二维码,获取账号密码后免费查看答案
前往登录
忘记密码
×
忘记密码
使用微信扫描下方二维码,即可找回您的账号密码
前往登录
立即注册
搜题/搜资源
【单选题】【消耗次数:1】
两个指针P和Q,分别指向单链表的两个元素,P所指元素是Q所指元素前驱的条件是( )。
①
P-next==Q-next
②
P-next==Q
③
Q-next==
④
P==Q
参考答案:
复制
纠错
相关题目
【单选题】
若有以下定义:structnode{intdata;structnode*next;}*p,*q;已建立如下图所示的链表:┌──┬──┐┌──┬──┐...p→│data│next┼→│data│NULL│└──┴──┘└──┴──┘┌──┬──┐q→│data│next│└──┴──┘不能将指针q所指结点连到上图所示链表末尾的语句是()。
①
q-next=NULL;p=p-p-next=q;
②
p=p-p-next=q;q-next=NULL;
③
p=p-q-next=p-p-next=q;
④
q-next=p-p=p-p-next=q;
查看完整题目与答案
【单选题】
在一个单链表中,p、q分别指向表中两个相邻的结点,且q所指结点是p所指结点的直接后继,现要删除q所指结点,可用语句( )。
①
A.p=q-next
②
B.p-next=q
③
C.p-next=q-next
④
D.q-next=NULL
查看完整题目与答案
【判断题】
在双向链表中,要在p所指的结后插入q所指的结点(设q所指的结点已赋值),其中所用的一条语句(p-next)-prior=q; 的功能是使P所指结点的直接前驱的左指针指向q 。
①
正确
②
错误
查看完整题目与答案
【单选题】
t和q分别指向图中所示结点:ptq↓↓↓┌──┬──┐┌──┬──┐┌──┬──┐│data│next┼→│data│next┼→│data│next┼→...└──┴──┘└──┴──┘└──┴──┘现要将t和q所指结点的先后位置交换,同时要保持链表的连续,以下错误的程序段是()
①
t-next=q-p-next=q;q-next=t;
②
p-next=q;t-next=q-q-next=t;
③
q-next=t;t-next=q-p-next=q;
④
t-next=q-q-next=t;p-next=q;
查看完整题目与答案
【单选题】
设有两个串p和q,其中q是p的子串,q在p中首次出现的位置的算法称为( )。
①
A.求子串
②
B.连接
③
C.匹配
④
D.求串长
查看完整题目与答案
【单选题】
下列为两个命题变元P,Q的小项是( )
①
P∧Q∧┐P
②
┐P∨Q
③
┐P∧Q
④
┐P∨P∨Q
查看完整题目与答案
【判断题】
在双向链表中,要删除p所指的结点,其中所用的一条语句(p-prior)-next=p-next;的功能是:使P所指结点的直接前驱的右指针指向P所指结点的直接后继。
①
正确
②
错误
查看完整题目与答案
【单选题】
在一个单链表中,已知q结点是p结点的前趋结点,若在q和p之间插入s结点,则须执行( )。
①
s->next=p->next; p->next=s
②
q->next=s; s->next=p
③
p->next=s->next; s->next=p
④
p->next=s; s->next=q
查看完整题目与答案
【单选题】
命题公式(P∧(P→Q))→Q是( )
①
矛盾式
②
蕴含式
③
重言式
④
等价式
查看完整题目与答案
【单选题】
假定一个链表的表头指针为f,结点结构为(data,next),则向该链表的表头插入一个由p所指向的结点时,应执行的操作为p-next=f和( )。
①
p=f-next
②
f=p-next
③
f=p
④
f-next=p
查看完整题目与答案
随机题目
【单选题】
Heisquitesurethatit’s_____impossibleforhimtofulfillthetaskwithintwodays
①
absolutely
②
exclusively
③
fully
④
roughly
查看完整题目与答案
【单选题】
---Excuseme,doyouhavesmallchangeforadollar?---____________________.
①
Whydoyouwanttochange?
②
Isitmybusiness?
③
AredimesandquartersOK?
④
Youshouldn’taskastrangerforchange.
查看完整题目与答案
【单选题】
Heslicedhisfinger____whendoingdishes
①
onpurpose
②
onthespot
③
byaccident
④
byanticipation
查看完整题目与答案
【单选题】
acertaindoubtamongthepeopleastothepracticalvalueoftheproject
①
Ithas
②
Theyhave
③
Itremains
④
Thereremains
查看完整题目与答案
【单选题】
Theproductinherfactoryisbetterthan_________
①
whichofmine
②
thatofmine
③
mine
④
whatofmine
查看完整题目与答案
【单选题】
-----CanyoutellmewhereTonyis?-----__________________________
①
Attheoffice
②
He’sworking
③
He’sfromCanada
④
He’sverybusynow.
查看完整题目与答案
【单选题】
WheneverImether,_________wasfairlyoften,shegreetedmewithasweetsmile
①
who
②
which
③
when
④
that
查看完整题目与答案
【单选题】
Hehasspent____moneyonhisnewhouse
①
alargenumberof
②
thenumberof
③
lotsof
④
numbersof
查看完整题目与答案
【单选题】
Hi,Tom,howiseverythingwithyou?_______________,andhowareyou?
①
Don’tmentionit
②
Hm,nottoobad
③
Thanks
④
Prettyfast
查看完整题目与答案
【单选题】
The________countryforthe2012SummerOlympicsistheBritain.
①
designer
②
guest
③
host
④
master
查看完整题目与答案