AI智能整理导入 AI智能整理导入
×
首页 题库中心 c语言程序设计题库 题目详情
CA85E835B92000012B50FB49F93816B5
c语言程序设计题库
1,073
单选题

下面的代码实现将一个节点插入到链表中,其中结构体名称为student,请填空。

struct student *insert(______【1】_______, struct student *stud)
{ struct student *p0, *p1, *p2;
p1=head;
p0=stud;
if(head==NULL) {head=p0;______【2】________; break;}
while(p1!=NULL)
{
if (p0->numnum) break;
________【3】___________;
p1=p1->next;
}
if (p1==head) head=p0;
else p2->next=p0;
p0->next=p1;
______【4】_________;
return(head);
}

A
struct student *head
B
p0->next=NULL
C
p2=p1
D
n=n+1

答案解析

正确答案:ABCD

解析:

结构体与共用体
c语言程序设计题库

扫码进入小程序
随时随地练习

关闭
专为自学备考人员打造
试题通
自助导入本地题库
试题通
多种刷题考试模式
试题通
本地离线答题搜题
试题通
扫码考试方便快捷
试题通
海量试题每日更新
试题通
欢迎登录试题通
可以使用以下方式扫码登陆
试题通
使用APP登录
试题通
使用微信登录
xiaochengxu
联系电话:
400-660-3606
xiaochengxu