vault backup: 2026-02-05 09:23:59

This commit is contained in:
2026-02-05 09:23:59 +08:00
parent 6d9f343f7d
commit 9eb8dddda7
2 changed files with 42 additions and 11 deletions

View File

@@ -29,11 +29,25 @@
"type": "webviewer", "type": "webviewer",
"state": { "state": {
"url": "https://share.note.youdao.com/ynoteshare/index.html?id=a66c778ce8c6e4ee03608e493e59ba7a&type=notebook&_time=1768473840238#/WEB4f51ebc698a96e5cc1a682b2fb7b683d", "url": "https://share.note.youdao.com/ynoteshare/index.html?id=a66c778ce8c6e4ee03608e493e59ba7a&type=notebook&_time=1768473840238#/WEB4f51ebc698a96e5cc1a682b2fb7b683d",
"title": "02C语言", "title": "CQ2605",
"mode": "webview" "mode": "webview"
}, },
"icon": "globe-2", "icon": "globe-2",
"title": "02C语言" "title": "CQ2605"
}
},
{
"id": "187fab6e2e98dad6",
"type": "leaf",
"state": {
"type": "webviewer",
"state": {
"url": "https://share.note.youdao.com/ynoteshare/index.html?id=a66c778ce8c6e4ee03608e493e59ba7a&type=notebook&_time=1768473840238#/WEB5c35414ed043f2b383d52a7ee225b9ac",
"title": "CQ2605",
"mode": "webview"
},
"icon": "globe-2",
"title": "CQ2605"
} }
}, },
{ {
@@ -51,7 +65,8 @@
"title": "2-4" "title": "2-4"
} }
} }
] ],
"currentTab": 3
} }
], ],
"direction": "vertical" "direction": "vertical"
@@ -118,13 +133,13 @@
"state": { "state": {
"type": "outline", "type": "outline",
"state": { "state": {
"file": "YueQian/相关网站.md", "file": "YueQian/Homework/2-4.md",
"followCursor": true, "followCursor": true,
"showSearch": false, "showSearch": false,
"searchQuery": "" "searchQuery": ""
}, },
"icon": "lucide-list", "icon": "lucide-list",
"title": "相关网站 的大纲" "title": "2-4 的大纲"
} }
}, },
{ {
@@ -234,7 +249,7 @@
} }
} }
], ],
"currentTab": 3 "currentTab": 2
}, },
{ {
"id": "bf1e7d1a52b4651c", "id": "bf1e7d1a52b4651c",
@@ -275,10 +290,11 @@
"remotely-save:Remotely Save": false "remotely-save:Remotely Save": false
} }
}, },
"active": "e0e88d3f2dd6fbc1", "active": "add960c244d7897d",
"lastOpenFiles": [ "lastOpenFiles": [
"YueQian/Homework/2-4.md", "YueQian/Homework/2-4.md",
"YueQian/相关网站.md", "YueQian/相关网站.md",
"Diary/2026-2/2026-2-5 周四.md",
"Diary/2026-2/2026-2-4 周三.md", "Diary/2026-2/2026-2-4 周三.md",
"YueQian/Homework/~WRL0001.tmp", "YueQian/Homework/~WRL0001.tmp",
"YueQian/Homework/~WRD0000.tmp", "YueQian/Homework/~WRD0000.tmp",
@@ -315,7 +331,6 @@
"Diary/2026-1/2026-1-28 周三.md", "Diary/2026-1/2026-1-28 周三.md",
"Excalidraw/Drawing 20260122.md", "Excalidraw/Drawing 20260122.md",
"Diary/2026-1/2026-1-27 周二.md", "Diary/2026-1/2026-1-27 周二.md",
"Diary/2026-1/2026-1-26 周一.md",
"Excalidraw/Untitled.canvas", "Excalidraw/Untitled.canvas",
"Article/Studyroad/vivado_ip_img/IPCore10.png", "Article/Studyroad/vivado_ip_img/IPCore10.png",
"Article/Studyroad/vivado_ip_img/IPCore07.png", "Article/Studyroad/vivado_ip_img/IPCore07.png",

View File

@@ -1,9 +1,15 @@
--- ---
tags: tags:
- empty - 作业
- C语言
aliases: empty aliases: empty
日期: 2026/2/4 日期: 2026/2/4
--- ---
# 2-4作业
## 定义一个长度为20的整型数据生成随机数对这个数组进行初始化编写排序函数对这个数据中的数据进行从小到大排序
- 要求编写五种排序函数:冒泡排序、选择排序、插入排序、快速排序、希尔排序
- 提示:[排序算法参考](https://www.cnblogs.com/onepixel/p/7674659.html)
```c ```c
#include <stdio.h> #include <stdio.h>
@@ -58,8 +64,6 @@ void selection_sort(int *arr, int len)
    }     }
} }
void quick_sort(int *arr, int left, int right) void quick_sort(int *arr, int left, int right)
{ {
    if (left > right)     if (left > right)
@@ -105,3 +109,15 @@ int main(int argc, char const *argv[])
    return 0;     return 0;
} }
``` ```
## 制作一个图书管理系统,要求:
1. 输入1增加书籍名称可以连续添加多本
2. 输入2删除数书籍名称删除一本或全部删除
3. 输入3修改书籍名称
4. 输入4查找书籍名称模糊查找或精确查找
5. 输入5显示所有书籍
6. 输入0退出系统
只要系统未退出则可以继续重复进行,直至系统退出。
**提示:**`char *book_name[1000]; `// 表示表示最多可存放1000书书名的长度自己设计。
```c
```