酷代码 AI
菜单
服务商
DeepSeek字节豆包讯飞星火
更多选项

链表操作:如何删除链表中指定 name 域的结点?

```c struct stu * mydel(struct stu *head,char *name) { struct stu *current = head; struct stu *previous = NULL; while (current != NULL) { if (strcmp(current->name, name) == 0) { if (previous == NULL) { head = current->next; } else { previous->next = current->next; } free(current); return head; } previous = current; current = current->next; } printf("no found\n"); return head; } ``` ######[AI问答 | 143点数解答 | 2025-12-25 15:51:01]

相关提问
本站限时免费提问中
实用工具查看更多
Linux在线手册 [开发类]
Jquery在线手册 [开发类]
今日油价 [生活类]
图片互转base64 [开发类]
时间转换器 [开发类]