首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
考研
下面的算法实现的是带附加头结点的单链表数据结点逆序连接,空缺处应当填入( )。 void reverse(pointer h){ //h为附加头结点指针 pointer p,q; P=h一>next;h一>next=NULL;
下面的算法实现的是带附加头结点的单链表数据结点逆序连接,空缺处应当填入( )。 void reverse(pointer h){ //h为附加头结点指针 pointer p,q; P=h一>next;h一>next=NULL;
admin
2019-08-15
29
问题
下面的算法实现的是带附加头结点的单链表数据结点逆序连接,空缺处应当填入( )。
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/plCi777K
本试题收录于:
计算机408题库学硕统考专业分类
0
计算机408
学硕统考专业
相关试题推荐
当陪审员和议事会成员在工作能够获得津贴时,雅典的所有公民都能有机会()。
基督教产生的时间是()。
关于一战后构筑的凡尔赛体系,说法不正确的是()。
顽固派破坏百日维新的手段有()①对变法诏令阳奉阴违托词抗命②把京津地区的兵权都抓在手中③改总理衙门为外务部讨好列强④慈禧太后直接控制人事任免权
(1)根据无类IP地址的规则,每个网段中有两个地址是不分配的:主机号全0表示网络地址,主机号全1表示广播地址。因此8位主机号所能表示的主机数就是28-2,即254台。该网络要划分为两个子网,每个子网要120台主机,因此主机位数X应该满足下面三个条件:
设有m个连续单元供一个栈与队列使用,且栈与队列的实际占用单元数事先不知道,但是要求在任何时刻它们占用的单元数量不超过m,试写出上述栈与队列的插入算法。
某计算机系统字长为32位,包含2个选择通道和1个字节多路通道,每个选择通道上连接了2台磁盘机和2台磁带机,字节多路通道上连接了2台行式打印机、2台读卡器、10台终端。假定各设备的传输率如下:磁盘机:800KB/s磁带机:200KB/s
已知一个线性表(38,25,74,63,52,48),表长为16,假定采用散列函数h(key)=key%7,计算散列地址,并存储在散列表中,若采用线性探测方法解决冲突,在该散列表上,进行等概率成功查找的平均查找长度为()。
某路由器的IP地址是125.45.23.12,它在以太网上的物理地址为2345AB4F67CD,它收到了一个分组,分组中的目的IP地址是125.11.78.10。(1)试给出这个路由器发出的ARP请求分组中的各项目。假定不划分子网。
光纤分为单模光纤和多模光纤,这两种光纤的区别是()。
随机试题
迷走神经内含有肺牵张反射的传入纤维。动物实验中,意外切断一侧迷走神经后,动物的呼吸运动将会
下列哪项实验室检查结果不符合克罗恩病
氯化钠羟苯丙酯
财务预算作为全面预算体系中的最后环节,可以从价值方面总括地反映企业业务预算与专门决策预算的结果,财务预算属于总预算的一部分。()
根据布朗芬布伦纳(U.Bronfenbrenner)的生态系统理论,学校和家庭对孩子教育的一致性程度属于()
下列选项中,构成非法拘禁罪的有()(2017年非法学基础课多选第44题,2017年法学基础课多选第24题)
Pleasejoinallofusin______ChristineEschonherappointmentasHeadofOperationsPlanning.
Readthearticlebelowaboutminingmergersandthequestionsontheoppositepage.Foreachquestion(13-18),markonelette
"AnthropologyClass"Whatdoestheprofessormeanwhenhesaysthis:
Federaleffortstoaidminoritybusinessesbeganinthe1960’swhentheSmallBusinessAdministration(SBA)beganmakingfederal
最新回复
(
0
)