首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
考研
下面的算法实现的是带附加头结点的单链表数据结点逆序连接,空缺处应当填入( )。 void reverse(pointer h) { //h为附加头结点指针 pointer p,q; p=h一>next;
下面的算法实现的是带附加头结点的单链表数据结点逆序连接,空缺处应当填入( )。 void reverse(pointer h) { //h为附加头结点指针 pointer p,q; p=h一>next;
admin
2018-08-12
22
问题
下面的算法实现的是带附加头结点的单链表数据结点逆序连接,空缺处应当填入( )。
void reverse(pointer h) { //h为附加头结点指针
pointer p,q;
p=h一>next;h一>next=NULL;
while(p|=null) {
q=p;
p=p一>next;
q一>next=h一>next;
h一>next=(_____);
}
}
选项
A、h
B、p
C、q
D、q一>next
答案
C
解析
h一>next=q;表示将当前结点作为头结点后的第一元素结点插入。
转载请注明原文地址:https://kaotiyun.com/show/LcRi777K
本试题收录于:
计算机408题库学硕统考专业分类
0
计算机408
学硕统考专业
相关试题推荐
下列城市:①南京②厦门③天津④杭州,按其在近代历史上开放为商埠的时间先后顺序排列应该是()
第一国际成立前,各国无产阶级强烈要求加强国际团结的直接原因是()。
阅读材料回答以下问题:天既哀大地生人之多艰,黑帝乃降精而救民患,为神明,为圣王,为万世作师,为万民作保,为大地教主。生于乱世,乃据乱世而立三世之法,而垂精太平。乃因其所生之国,而立三世之义,而注意于大地远近、大小若一之大一统。乃立元以统天,以天为仁,以神
中华人民共和国恢复在联合国合法席位的时间是()。
秦二世元年(前209)七月,陈胜、吴广在()发动了中国历史上的第一次大规模的农民起义。
夷陵之战的交战双方是()。
若干个等待访问磁盘者依次要访问的柱面为20,44,40,4,80,12,76,假设每移动一个柱面需要3毫秒时间,移动臂当前位于40号柱面,请按下列算法分别计算为完成上述各次访问总共花费的寻找时间。(1)先来先服务算法;(2)最短寻找时间
ICMP在TCP/IP协议集中属于()。
已知4位有效信息为1010,试根据下列要求进行编码。(1)按配偶原则将其编码为扩展的海明码,要求能发现两位错并纠正一位错。(2)将其编码为循环冗余校验码,生成多项式G(x)=1011。
设二维数组A[6][10],每个数组元素占用4个存储单元,若按行优先顺序存放的数组元素,a[0][O]的存储地址为860,则a[3][5]的存储地址为()。
随机试题
什么叫政治体制?什么叫政治体制改革?它的目标的什么?
不是病毒感染对宿主细胞的直接作用()
A.血清C3正常B.血清C3在疾病活动期下降C.血清C3持续降低D.血清C3在起病初期下降,8周内恢复正常系膜毛细血管性肾小球肾炎患者
A.尺神经B.桡神经C.正中神经D.肱动脉肱骨干骨折,最容易损伤的组织是
影响糖代谢,导致血糖异常升高的药物有()。
认为转换用途再予以使用最为有利时,应以转换用途后再予以使用为前提进行估价。转换用途的条件是:预计转换用途所带来的房地产价值的()大于转换用途所需的费用。
小张到文具店采购办公用品,买了红黑两种笔共66支。红笔定价为5元,黑笔的定价为9元,由于买的数量较多,商店给予优惠,红笔打八五折,黑笔打八折,最后支付的金额比核定价少18%.那么他买了红笔:
进行IT服务测量与评估时,统计服务的可用程度是为了评价IT服务的()。
下列工具中不能用作安全评估的是()。
Recently,astudentusedhisPersonalDigitalAssistant(PDA)tofilmafemaleteacherberating(训斥)andtearingtheworkofac
最新回复
(
0
)