【单选题】【消耗次数:1】
头指针为head的带头结点的单向链表为空的判定条件是( )为真。
A. head= =NULL
B. head-next= =NULL
C. head-next=NULL;
D. head-next!= NULL
参考答案:
复制
纠错
相关题目
【单选题】 带头结点的单链表head为空的判定条件是
①  head=NULL;
②  head-next=NULL;
③  head-next=head;
④  head!=NULL;
【单选题】 若按如下定义,函数link的功能是()。其中head指向链表首结点,整个链表结构如下图:┌──┬─┐┌──┬─┐┌──┬──┐head→│data│┼→│data│┼→…→│data│NULL│└──┴─┘└──┴─┘└──┴──┘structnode{intdata;structnode*next;};voidlink(structnode*head){structnode*p=head;while(p!=NULL){if(p-data%2==1)printf("%d",p-p=p-}}
①  计算链表head中结点的个数
②  遍历链表head,输出表中值为奇数的元素
③  删除链表head中的所有结点
④  插入一个新元素到链表head中
【判断题】 带头结点的单向链表为空的判断条件是head = =NUL(设头指针为head)。
①  正确
②  错误
【单选题】 带头结点的链表为空的判断条件是( )(设头指针为head)。
①  A.head==NULL
②  B.head-next==NULL
③  C.head-next==head
④  D.head!=NULL
【单选题】 带头结点的单链表head为空的判定条件是( )。
①  head==NULL
②  head->next==NULL
③  head->next!=NULL
④  head!=NULL
【单选题】 对不带头结点的单向链表,判断是否为空的条件是( )(设头指针为head)。
①  A.head==NULL
②  B.head-next= =NULL
③  C.head-next= =head
④  D.head =NULL
【单选题】 若有以下定义:structnode{intdata;structnode*next;}structnodem,n,k,*head,*p;已建立如下图所示的链表:mnk┌──┬──┐┌──┬──┐┌──┬──┐head→│data│next┼→│data│NULL│p→│data│next│└──┴──┘└──┴──┘└──┴──┘指针head指向变量m,m.next指向变量n,p指向变量k,不能把结点k插到m和n之间形成新链表的程序段是()。
①  p-next=head-m.next=p;
②  (*head).next=p;(*p).next=
③  head-next=p-next=head
④  -m.next=k.next=
【判断题】 设有一个带头结点的,头指针为head的单向链表,p指向表中某一个结点,且有p-next= L,现要删除头结点,并使该单向链表构造成单向循环链表,通过操作head=head- p-next= head;。
①  正确
②  错误
【单选题】 若有定义:structnode{intdata;structnode*next;};已建立如下图所示的链表:┌─┬─┐┌─┬─┐┌─┬─┐head→│2│┼→│4│┼→…→│28│┼→NULL└─┴─┘└─┴─┘└─┴─┘指针head指向链表首结点,以下函数的功能是()。voidfun(structnode*head){structnode*p=head;while(1){p=p-printf("%d",p-data);if(!p)break;}}
①  显示单向链表中第一个结点的数据
②  显示单向链表中最后一个结点的数据
③  显示单向链表中的所有数据
④  显示单向链表中除第一个结点外的所有数据
【单选题】 对于一个头指针为head的带头结点的单链表,判定该表为空表的条件是()。
①  head==NULL
②  head-next==NULL
③  head-next==head
④  head-next=head
随机题目
【单选题】 —Whatdopeopleheredoonweekends?—Well,somepeopleliketostayathome,but____liketogooutside.
①  other
②  otherone
③  others
④  another
【单选题】 -Wouldyouliketoordernow?-----_________________________
①  Iamfullnow.
②  Butthepriceissohigh.
③  Yes.I’dlikefishandrice.
④  Thanks.Itisverykindofyou.
【单选题】 Whenshewasyoung,she___attenintheeveningandshesoon____.
①  fellasleep;wenttobed
②  slept;wenttobed
③  wenttofellasleep
④  fellasleep;slept
【单选题】 _____fashiondiffersfromcountrytocountrymayreflecttheculturaldifferencesfromoneaspect.
①  What
②  That
③  This
④  Which
【单选题】 English____inCanada
①  speaks
②  arespoken
③  isspeaking
④  isspoken
【单选题】 Mrs.Kinghasvisitedtheartmuseum.Iamgoingto____hersomewhereelsethisafternoon.
①  take
②  bring
③  push
④  carry
【单选题】 —Weneverknow_____theoldmanis.—Theysayheisateacher.
①  what
②  who
③  which
④  where
【单选题】 Theradiosays____acolddayinNorthChinatomorrow.
①  willbe
②  therewillbe
③  willhave
④  willget
【单选题】 ---Whatasurprise!Youchangedyourhairstyle.---Yes,andanothersurprise.I’mgoingtogetmarriednextSaturday.
①  Oh,sorry,Inearlyforgotthat.
②  Really?Congratulations!
③  Howabouttime?I’llbebusythen.
④  That’sOK.Saturdayisthemostsuitabledayforanymarriage.
【单选题】 I___lightblue____darkblue.
①  like;than
②  prefer;to
③  prefer;than
④  like;to