{"id":110,"date":"2026-09-24T17:05:13","date_gmt":"2026-09-24T08:05:13","guid":{"rendered":"https:\/\/decagrammaton.xyz\/?p=110"},"modified":"2026-09-24T17:05:14","modified_gmt":"2026-09-24T08:05:14","slug":"16-c%e8%af%ad%e8%a8%80%e7%bb%bc%e5%90%88%e9%a1%b9%e7%9b%ae","status":"publish","type":"post","link":"https:\/\/decagrammaton.xyz\/?p=110","title":{"rendered":"16-C\u8bed\u8a00\u7efc\u5408\u9879\u76ee"},"content":{"rendered":"\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">\u524d\u9762\u6211\u4eec\u5df2\u7ecf\u5b66\u4e60\u4e86\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u53d8\u91cf\u548c\u6570\u636e\u7c7b\u578b\n\u8f93\u5165\u8f93\u51fa\n\u8fd0\u7b97\u7b26\n\u5224\u65ad\n\u5faa\u73af\n\u51fd\u6570\n\u6570\u7ec4\n...<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u5230\u8fd9\u91cc\uff0c\u771f\u6b63\u7f3a\u5c11\u7684\u4e0d\u662f\u65b0\u7684\u8bed\u6cd5\uff0c\u800c\u662f\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u628a\u8fd9\u4e9b\u77e5\u8bc6\u7ec4\u5408\u8d77\u6765\u3002<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6240\u4ee5\u8fd9\u4e00\u7ae0\u4e0d\u518d\u4ee5\u201c\u5b66\u4e60\u4e00\u4e2a\u65b0\u8bed\u6cd5\u201d\u4e3a\u4e3b\uff0c\u800c\u662f\u901a\u8fc7\u51e0\u4e2a\u5b9e\u9645\u9879\u76ee\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u9700\u6c42\n\u2193\n\u8bbe\u8ba1\u6570\u636e\n\u2193\n\u5199\u51fd\u6570\n\u2193\n\u62c6\u5206\u6a21\u5757\n\u2193\n\u4fdd\u5b58\u6587\u4ef6\n\u2193\n\u7f16\u8bd1\n\u2193\n\u8c03\u8bd5<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b8c\u6210\u4e00\u4e2a\u771f\u6b63\u53ef\u4ee5\u8fd0\u884c\u7684 C \u7a0b\u5e8f\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u4e00\u3001\u672c\u7ae0\u9879\u76ee\u8def\u7ebf<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">\u5efa\u8bae\u6309\u7167\u96be\u5ea6\u9010\u6e10\u589e\u52a0\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u9879\u76ee 1\uff1a\u731c\u6570\u5b57\n        \u2193\n\u9879\u76ee 2\uff1a\u5b66\u751f\u7ba1\u7406\u7cfb\u7edf\n        \u2193\n\u9879\u76ee 3\uff1a\u8bfe\u7a0b\u8868\u7ba1\u7406\u7cfb\u7edf<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e09\u4e2a\u9879\u76ee\u5206\u522b\u953b\u70bc\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u731c\u6570\u5b57\n\u2193\n\u57fa\u7840\u8bed\u6cd5 + \u51fd\u6570 + \u5faa\u73af\n\n\u5b66\u751f\u7ba1\u7406\u7cfb\u7edf\n\u2193\n\u6570\u7ec4 + \u5b57\u7b26\u4e32 + \u7ed3\u6784\u4f53 + \u6587\u4ef6\n\n\u8bfe\u7a0b\u8868\u7ba1\u7406\u7cfb\u7edf\n\u2193\n\u7ed3\u6784\u4f53 + \u52a8\u6001\u5185\u5b58 + \u6587\u4ef6\n+ \u591a\u6587\u4ef6 + Makefile\n+ \u5b8c\u6574\u9879\u76ee\u8bbe\u8ba1<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u4e8c\u3001\u9879\u76ee 1\uff1a\u731c\u6570\u5b57<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u662f\u6700\u7b80\u5355\u7684\u7efc\u5408\u9879\u76ee\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u9879\u76ee\u9700\u6c42<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u7a0b\u5e8f\u968f\u673a\u751f\u6210\u4e00\u4e2a\u6570\u5b57\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>1 ~ 100<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u7136\u540e\u7528\u6237\u4e0d\u65ad\u8f93\u5165\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u4f60\u731c\u4e00\u4e2a\u6570\u5b57<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u7a0b\u5e8f\u544a\u8bc9\u7528\u6237\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u592a\u5927\n\u592a\u5c0f\n\u731c\u5bf9\u4e86<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f8b\u5982\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u8bf7\u8f93\u5165\u6570\u5b57\uff1a50\n\u592a\u5c0f\n\n\u8bf7\u8f93\u5165\u6570\u5b57\uff1a75\n\u592a\u5927\n\n\u8bf7\u8f93\u5165\u6570\u5b57\uff1a63\n\u731c\u5bf9\u4e86\uff01<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u4e09\u3001\u731c\u6570\u5b57\u9700\u8981\u54ea\u4e9b\u77e5\u8bc6<\/h1>\n\n\n\n<pre class=\"wp-block-code\"><code>\u53d8\u91cf\n\u2193\nscanf\n\u2193\nif\n\u2193\nwhile\n\u2193\n\u51fd\u6570\n\u2193\n\u968f\u673a\u6570<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u53ef\u4ee5\u8fdb\u4e00\u6b65\u7ec3\u4e60\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u7edf\u8ba1\u731c\u4e86\u591a\u5c11\u6b21<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u56db\u3001\u731c\u6570\u5b57\u57fa\u7840\u4ee3\u7801<\/h1>\n\n\n\n<div class=\"sourceCode\" id=\"cb11\"><pre class=\"sourceCode c\"><code class=\"sourceCode c\"><span id=\"cb11-1\"><a href=\"#cb11-1\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"pp\">#include <\/span><span class=\"im\">&lt;stdio.h&gt;<\/span><\/span>\n<span id=\"cb11-2\"><a href=\"#cb11-2\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"pp\">#include <\/span><span class=\"im\">&lt;stdlib.h&gt;<\/span><\/span>\n<span id=\"cb11-3\"><a href=\"#cb11-3\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"pp\">#include <\/span><span class=\"im\">&lt;time.h&gt;<\/span><\/span>\n<span id=\"cb11-4\"><a href=\"#cb11-4\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><\/span>\n<span id=\"cb11-5\"><a href=\"#cb11-5\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"dt\">int<\/span> main<span class=\"op\">()<\/span> <span class=\"op\">{<\/span><\/span>\n<span id=\"cb11-6\"><a href=\"#cb11-6\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><\/span>\n<span id=\"cb11-7\"><a href=\"#cb11-7\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    srand<span class=\"op\">((<\/span><span class=\"dt\">unsigned<\/span> <span class=\"dt\">int<\/span><span class=\"op\">)<\/span>time<span class=\"op\">(<\/span>NULL<span class=\"op\">));<\/span><\/span>\n<span id=\"cb11-8\"><a href=\"#cb11-8\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><\/span>\n<span id=\"cb11-9\"><a href=\"#cb11-9\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"dt\">int<\/span> target <span class=\"op\">=<\/span> rand<span class=\"op\">()<\/span> <span class=\"op\">%<\/span> <span class=\"dv\">100<\/span> <span class=\"op\">+<\/span> <span class=\"dv\">1<\/span><span class=\"op\">;<\/span><\/span>\n<span id=\"cb11-10\"><a href=\"#cb11-10\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"dt\">int<\/span> guess<span class=\"op\">;<\/span><\/span>\n<span id=\"cb11-11\"><a href=\"#cb11-11\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"dt\">int<\/span> count <span class=\"op\">=<\/span> <span class=\"dv\">0<\/span><span class=\"op\">;<\/span><\/span>\n<span id=\"cb11-12\"><a href=\"#cb11-12\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><\/span>\n<span id=\"cb11-13\"><a href=\"#cb11-13\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"cf\">while<\/span> <span class=\"op\">(<\/span><span class=\"dv\">1<\/span><span class=\"op\">)<\/span> <span class=\"op\">{<\/span><\/span>\n<span id=\"cb11-14\"><a href=\"#cb11-14\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><\/span>\n<span id=\"cb11-15\"><a href=\"#cb11-15\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>        printf<span class=\"op\">(<\/span><span class=\"st\">\"\u8bf7\u8f93\u5165\u6570\u5b57: \"<\/span><span class=\"op\">);<\/span><\/span>\n<span id=\"cb11-16\"><a href=\"#cb11-16\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>        scanf<span class=\"op\">(<\/span><span class=\"st\">\"<\/span><span class=\"sc\">%d<\/span><span class=\"st\">\"<\/span><span class=\"op\">,<\/span> <span class=\"op\">&amp;<\/span>guess<span class=\"op\">);<\/span><\/span>\n<span id=\"cb11-17\"><a href=\"#cb11-17\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><\/span>\n<span id=\"cb11-18\"><a href=\"#cb11-18\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>        count<span class=\"op\">++;<\/span><\/span>\n<span id=\"cb11-19\"><a href=\"#cb11-19\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><\/span>\n<span id=\"cb11-20\"><a href=\"#cb11-20\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>        <span class=\"cf\">if<\/span> <span class=\"op\">(<\/span>guess <span class=\"op\">&gt;<\/span> target<span class=\"op\">)<\/span> <span class=\"op\">{<\/span><\/span>\n<span id=\"cb11-21\"><a href=\"#cb11-21\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>            printf<span class=\"op\">(<\/span><span class=\"st\">\"\u592a\u5927\u4e86<\/span><span class=\"sc\">\\n<\/span><span class=\"st\">\"<\/span><span class=\"op\">);<\/span><\/span>\n<span id=\"cb11-22\"><a href=\"#cb11-22\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>        <span class=\"op\">}<\/span><\/span>\n<span id=\"cb11-23\"><a href=\"#cb11-23\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>        <span class=\"cf\">else<\/span> <span class=\"cf\">if<\/span> <span class=\"op\">(<\/span>guess <span class=\"op\">&lt;<\/span> target<span class=\"op\">)<\/span> <span class=\"op\">{<\/span><\/span>\n<span id=\"cb11-24\"><a href=\"#cb11-24\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>            printf<span class=\"op\">(<\/span><span class=\"st\">\"\u592a\u5c0f\u4e86<\/span><span class=\"sc\">\\n<\/span><span class=\"st\">\"<\/span><span class=\"op\">);<\/span><\/span>\n<span id=\"cb11-25\"><a href=\"#cb11-25\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>        <span class=\"op\">}<\/span><\/span>\n<span id=\"cb11-26\"><a href=\"#cb11-26\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>        <span class=\"cf\">else<\/span> <span class=\"op\">{<\/span><\/span>\n<span id=\"cb11-27\"><a href=\"#cb11-27\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>            printf<span class=\"op\">(<\/span><span class=\"st\">\"\u731c\u5bf9\u4e86\uff01<\/span><span class=\"sc\">\\n<\/span><span class=\"st\">\"<\/span><span class=\"op\">);<\/span><\/span>\n<span id=\"cb11-28\"><a href=\"#cb11-28\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>            printf<span class=\"op\">(<\/span><span class=\"st\">\"\u4f60\u4e00\u5171\u731c\u4e86 <\/span><span class=\"sc\">%d<\/span><span class=\"st\"> \u6b21<\/span><span class=\"sc\">\\n<\/span><span class=\"st\">\"<\/span><span class=\"op\">,<\/span> count<span class=\"op\">);<\/span><\/span>\n<span id=\"cb11-29\"><a href=\"#cb11-29\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>            <span class=\"cf\">break<\/span><span class=\"op\">;<\/span><\/span>\n<span id=\"cb11-30\"><a href=\"#cb11-30\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>        <span class=\"op\">}<\/span><\/span>\n<span id=\"cb11-31\"><a href=\"#cb11-31\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"op\">}<\/span><\/span>\n<span id=\"cb11-32\"><a href=\"#cb11-32\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><\/span>\n<span id=\"cb11-33\"><a href=\"#cb11-33\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"cf\">return<\/span> <span class=\"dv\">0<\/span><span class=\"op\">;<\/span><\/span>\n<span id=\"cb11-34\"><a href=\"#cb11-34\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"op\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u4e94\u3001\u731c\u6570\u5b57\u5347\u7ea7<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">\u53ef\u4ee5\u52a0\u5165\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u96be\u5ea6\n\u251c\u2500 \u7b80\u5355\uff1a1 ~ 50\n\u251c\u2500 \u666e\u901a\uff1a1 ~ 100\n\u2514\u2500 \u56f0\u96be\uff1a1 ~ 1000<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd8\u53ef\u4ee5\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u9650\u5236\u731c\u6d4b\u6b21\u6570<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f8b\u5982\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u6700\u591a 10 \u6b21<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e5f\u53ef\u4ee5\u589e\u52a0\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u91cd\u65b0\u5f00\u59cb\n\u9000\u51fa<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u5c31\u5f00\u59cb\u6709\u201c\u5c0f\u7a0b\u5e8f\u201d\u7684\u611f\u89c9\u4e86\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u516d\u3001\u9879\u76ee 2\uff1a\u5b66\u751f\u7ba1\u7406\u7cfb\u7edf<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u662f\u672c\u7ae0\u7b2c\u4e00\u4e2a\u771f\u6b63\u91cd\u8981\u7684\u9879\u76ee\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u9879\u76ee\u76ee\u6807\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u6dfb\u52a0\u5b66\u751f\n\u5220\u9664\u5b66\u751f\n\u4fee\u6539\u5b66\u751f\n\u67e5\u8be2\u5b66\u751f\n\u663e\u793a\u6240\u6709\u5b66\u751f\n\u4fdd\u5b58\u5b66\u751f\n\u8bfb\u53d6\u5b66\u751f\n\u9000\u51fa\u7a0b\u5e8f<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u4e03\u3001\u5b66\u751f\u7684\u6570\u636e\u7ed3\u6784<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">\u524d\u9762\u5df2\u7ecf\u5b66\u8fc7\u7ed3\u6784\u4f53\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u53ef\u4ee5\u5b9a\u4e49\uff1a<\/p>\n\n\n\n<div class=\"sourceCode\" id=\"cb17\"><pre class=\"sourceCode c\"><code class=\"sourceCode c\"><span id=\"cb17-1\"><a href=\"#cb17-1\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"kw\">typedef<\/span> <span class=\"kw\">struct<\/span> <span class=\"op\">{<\/span><\/span>\n<span id=\"cb17-2\"><a href=\"#cb17-2\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"dt\">int<\/span> id<span class=\"op\">;<\/span><\/span>\n<span id=\"cb17-3\"><a href=\"#cb17-3\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"dt\">char<\/span> name<span class=\"op\">[<\/span><span class=\"dv\">50<\/span><span class=\"op\">];<\/span><\/span>\n<span id=\"cb17-4\"><a href=\"#cb17-4\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"dt\">int<\/span> age<span class=\"op\">;<\/span><\/span>\n<span id=\"cb17-5\"><a href=\"#cb17-5\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"dt\">double<\/span> score<span class=\"op\">;<\/span><\/span>\n<span id=\"cb17-6\"><a href=\"#cb17-6\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"op\">}<\/span> Student<span class=\"op\">;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e00\u4e2a\u5b66\u751f\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Student\n\u251c\u2500 id\n\u251c\u2500 name\n\u251c\u2500 age\n\u2514\u2500 score<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u516b\u3001\u5b66\u751f\u7ba1\u7406\u7cfb\u7edf\u7684\u6570\u636e<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">\u6700\u7b80\u5355\u7248\u672c\u53ef\u4ee5\uff1a<\/p>\n\n\n\n<div class=\"sourceCode\" id=\"cb19\"><pre class=\"sourceCode c\"><code class=\"sourceCode c\"><span id=\"cb19-1\"><a href=\"#cb19-1\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>Student students<span class=\"op\">[<\/span><span class=\"dv\">100<\/span><span class=\"op\">];<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f46\u662f\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u6700\u591a\u53ea\u80fd 100 \u4eba<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e3a\u4e86\u7ec3\u4e60\u52a8\u6001\u5185\u5b58\uff0c\u53ef\u4ee5\u8fdb\u4e00\u6b65\uff1a<\/p>\n\n\n\n<div class=\"sourceCode\" id=\"cb21\"><pre class=\"sourceCode c\"><code class=\"sourceCode c\"><span id=\"cb21-1\"><a href=\"#cb21-1\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>Student <span class=\"op\">*<\/span>students<span class=\"op\">;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u7136\u540e\uff1a<\/p>\n\n\n\n<div class=\"sourceCode\" id=\"cb22\"><pre class=\"sourceCode c\"><code class=\"sourceCode c\"><span id=\"cb22-1\"><a href=\"#cb22-1\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>students <span class=\"op\">=<\/span> malloc<span class=\"op\">(<\/span><span class=\"kw\">sizeof<\/span><span class=\"op\">(<\/span>Student<span class=\"op\">)<\/span> <span class=\"op\">*<\/span> capacity<span class=\"op\">);<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u6837\u5c31\u53ef\u4ee5\u5728\u8fd0\u884c\u65f6\u51b3\u5b9a\u5bb9\u91cf\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u4e5d\u3001\u5b66\u751f\u7ba1\u7406\u7cfb\u7edf\u7684\u529f\u80fd<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">\u63a8\u8350\u8bbe\u8ba1\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>1. \u6dfb\u52a0\u5b66\u751f\n2. \u5220\u9664\u5b66\u751f\n3. \u4fee\u6539\u5b66\u751f\n4. \u67e5\u8be2\u5b66\u751f\n5. \u663e\u793a\u5168\u90e8\n6. \u4fdd\u5b58\u6570\u636e\n7. \u8bfb\u53d6\u6570\u636e\n0. \u9000\u51fa<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u5341\u3001\u83dc\u5355<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">\u7a0b\u5e8f\u542f\u52a8\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>========== \u5b66\u751f\u7ba1\u7406\u7cfb\u7edf ==========\n\n1. \u6dfb\u52a0\u5b66\u751f\n2. \u5220\u9664\u5b66\u751f\n3. \u4fee\u6539\u5b66\u751f\n4. \u67e5\u8be2\u5b66\u751f\n5. \u663e\u793a\u5168\u90e8\n6. \u4fdd\u5b58\u6570\u636e\n7. \u8bfb\u53d6\u6570\u636e\n0. \u9000\u51fa\n\n\u8bf7\u8f93\u5165\u9009\u62e9\uff1a<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u91cc\u4e3b\u8981\u4f7f\u7528\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>printf\nscanf\nswitch\nwhile<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u5341\u4e00\u3001\u6dfb\u52a0\u5b66\u751f<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">\u51fd\u6570\uff1a<\/p>\n\n\n\n<div class=\"sourceCode\" id=\"cb26\"><pre class=\"sourceCode c\"><code class=\"sourceCode c\"><span id=\"cb26-1\"><a href=\"#cb26-1\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"dt\">void<\/span> add_student<span class=\"op\">(<\/span>Student <span class=\"op\">*<\/span>students<span class=\"op\">,<\/span> <span class=\"dt\">int<\/span> <span class=\"op\">*<\/span>count<span class=\"op\">);<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u57fa\u672c\u903b\u8f91\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u5224\u65ad\u662f\u5426\u8fd8\u6709\u7a7a\u95f4\n\u2193\n\u8f93\u5165 id\n\u2193\n\u8f93\u5165 name\n\u2193\n\u8f93\u5165 age\n\u2193\n\u8f93\u5165 score\n\u2193\ncount++<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u5341\u4e8c\u3001\u4e3a\u4ec0\u4e48 count \u8981\u4f20\u6307\u9488<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f8b\u5982\uff1a<\/p>\n\n\n\n<div class=\"sourceCode\" id=\"cb28\"><pre class=\"sourceCode c\"><code class=\"sourceCode c\"><span id=\"cb28-1\"><a href=\"#cb28-1\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"dt\">int<\/span> count <span class=\"op\">=<\/span> <span class=\"dv\">0<\/span><span class=\"op\">;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u51fd\u6570\uff1a<\/p>\n\n\n\n<div class=\"sourceCode\" id=\"cb29\"><pre class=\"sourceCode c\"><code class=\"sourceCode c\"><span id=\"cb29-1\"><a href=\"#cb29-1\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"dt\">void<\/span> add_student<span class=\"op\">(<\/span>Student <span class=\"op\">*<\/span>students<span class=\"op\">,<\/span> <span class=\"dt\">int<\/span> <span class=\"op\">*<\/span>count<span class=\"op\">)<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u7136\u540e\uff1a<\/p>\n\n\n\n<div class=\"sourceCode\" id=\"cb30\"><pre class=\"sourceCode c\"><code class=\"sourceCode c\"><span id=\"cb30-1\"><a href=\"#cb30-1\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"op\">(*<\/span>count<span class=\"op\">)++;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u56e0\u4e3a\u6211\u4eec\u8981\u4fee\u6539\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>main \u4e2d\u7684 count<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u6b63\u597d\u5e94\u7528\u4e86\u4e4b\u524d\u5b66\u7684\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u6307\u9488\n+\n\u51fd\u6570\u53c2\u6570<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u5341\u4e09\u3001\u663e\u793a\u5b66\u751f<\/h1>\n\n\n\n<div class=\"sourceCode\" id=\"cb33\"><pre class=\"sourceCode c\"><code class=\"sourceCode c\"><span id=\"cb33-1\"><a href=\"#cb33-1\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"dt\">void<\/span> print_students<span class=\"op\">(<\/span>Student <span class=\"op\">*<\/span>students<span class=\"op\">,<\/span> <span class=\"dt\">int<\/span> count<span class=\"op\">)<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f7f\u7528\uff1a<\/p>\n\n\n\n<div class=\"sourceCode\" id=\"cb34\"><pre class=\"sourceCode c\"><code class=\"sourceCode c\"><span id=\"cb34-1\"><a href=\"#cb34-1\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"cf\">for<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u904d\u5386\uff1a<\/p>\n\n\n\n<div class=\"sourceCode\" id=\"cb35\"><pre class=\"sourceCode c\"><code class=\"sourceCode c\"><span id=\"cb35-1\"><a href=\"#cb35-1\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>students<span class=\"op\">[<\/span><span class=\"dv\">0<\/span><span class=\"op\">]<\/span><\/span>\n<span id=\"cb35-2\"><a href=\"#cb35-2\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>students<span class=\"op\">[<\/span><span class=\"dv\">1<\/span><span class=\"op\">]<\/span><\/span>\n<span id=\"cb35-3\"><a href=\"#cb35-3\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>students<span class=\"op\">[<\/span><span class=\"dv\">2<\/span><span class=\"op\">]<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u8f93\u51fa\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ID    \u59d3\u540d    \u5e74\u9f84    \u6210\u7ee9\n1     Alice   18      95.5\n2     Bob     19      88.0<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u5341\u56db\u3001\u67e5\u8be2\u5b66\u751f<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">\u53ef\u4ee5\u6309\u7167\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ID<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u67e5\u8be2\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f8b\u5982\uff1a<\/p>\n\n\n\n<div class=\"sourceCode\" id=\"cb38\"><pre class=\"sourceCode c\"><code class=\"sourceCode c\"><span id=\"cb38-1\"><a href=\"#cb38-1\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>Student <span class=\"op\">*<\/span>find_student<span class=\"op\">(<\/span><\/span>\n<span id=\"cb38-2\"><a href=\"#cb38-2\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    Student <span class=\"op\">*<\/span>students<span class=\"op\">,<\/span><\/span>\n<span id=\"cb38-3\"><a href=\"#cb38-3\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"dt\">int<\/span> count<span class=\"op\">,<\/span><\/span>\n<span id=\"cb38-4\"><a href=\"#cb38-4\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"dt\">int<\/span> id<\/span>\n<span id=\"cb38-5\"><a href=\"#cb38-5\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"op\">);<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u627e\u5230\u540e\uff1a<\/p>\n\n\n\n<div class=\"sourceCode\" id=\"cb39\"><pre class=\"sourceCode c\"><code class=\"sourceCode c\"><span id=\"cb39-1\"><a href=\"#cb39-1\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"cf\">return<\/span> <span class=\"op\">&amp;<\/span>students<span class=\"op\">[<\/span>i<span class=\"op\">];<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u627e\u4e0d\u5230\uff1a<\/p>\n\n\n\n<div class=\"sourceCode\" id=\"cb40\"><pre class=\"sourceCode c\"><code class=\"sourceCode c\"><span id=\"cb40-1\"><a href=\"#cb40-1\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"cf\">return<\/span> NULL<span class=\"op\">;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u53c8\u540c\u65f6\u4f7f\u7528\u4e86\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u7ed3\u6784\u4f53\u6307\u9488\n+\n\u51fd\u6570\u8fd4\u56de\u503c\n+\nNULL<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u5341\u4e94\u3001\u4fee\u6539\u5b66\u751f<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">\u5148\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u8f93\u5165 ID<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u7136\u540e\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>find_student()<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u627e\u5230\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Student *<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u7136\u540e\u4fee\u6539\uff1a<\/p>\n\n\n\n<div class=\"sourceCode\" id=\"cb45\"><pre class=\"sourceCode c\"><code class=\"sourceCode c\"><span id=\"cb45-1\"><a href=\"#cb45-1\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>student<span class=\"op\">-&gt;<\/span>name<\/span>\n<span id=\"cb45-2\"><a href=\"#cb45-2\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>student<span class=\"op\">-&gt;<\/span>age<\/span>\n<span id=\"cb45-3\"><a href=\"#cb45-3\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>student<span class=\"op\">-&gt;<\/span>score<\/span><\/code><\/pre><\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u5341\u516d\u3001\u5220\u9664\u5b66\u751f<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">\u5220\u9664\u4e00\u4e2a\u6570\u7ec4\u5143\u7d20\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u627e\u5230\u76ee\u6807\n\u2193\n\u540e\u9762\u7684\u5143\u7d20\u5168\u90e8\u5411\u524d\u79fb\u52a8\n\u2193\ncount--<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f8b\u5982\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>A B C D<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u5220\u9664\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>B<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u53d8\u6210\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>A C D<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee3\u7801\u601d\u60f3\uff1a<\/p>\n\n\n\n<div class=\"sourceCode\" id=\"cb50\"><pre class=\"sourceCode c\"><code class=\"sourceCode c\"><span id=\"cb50-1\"><a href=\"#cb50-1\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"cf\">for<\/span> <span class=\"op\">(<\/span><span class=\"dt\">int<\/span> i <span class=\"op\">=<\/span> index<span class=\"op\">;<\/span> i <span class=\"op\">&lt;<\/span> count <span class=\"op\">-<\/span> <span class=\"dv\">1<\/span><span class=\"op\">;<\/span> i<span class=\"op\">++)<\/span> <span class=\"op\">{<\/span><\/span>\n<span id=\"cb50-2\"><a href=\"#cb50-2\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    students<span class=\"op\">[<\/span>i<span class=\"op\">]<\/span> <span class=\"op\">=<\/span> students<span class=\"op\">[<\/span>i <span class=\"op\">+<\/span> <span class=\"dv\">1<\/span><span class=\"op\">];<\/span><\/span>\n<span id=\"cb50-3\"><a href=\"#cb50-3\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"op\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u4f1a\u518d\u6b21\u7528\u5230\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u7ed3\u6784\u4f53\n+\n\u6570\u7ec4\n+\nfor<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u5341\u4e03\u3001\u4fdd\u5b58\u6587\u4ef6<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b66\u751f\u6570\u636e\u4e0d\u80fd\u53ea\u5b58\u5728\u5185\u5b58\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7a0b\u5e8f\u9000\u51fa\u4ee5\u540e\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>students\n\u2193\n\u6d88\u5931<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u6240\u4ee5\u9700\u8981\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u4fdd\u5b58\n\u2193\nstudents.dat<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f8b\u5982\uff1a<\/p>\n\n\n\n<div class=\"sourceCode\" id=\"cb54\"><pre class=\"sourceCode c\"><code class=\"sourceCode c\"><span id=\"cb54-1\"><a href=\"#cb54-1\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>fwrite<span class=\"op\">(<\/span><\/span>\n<span id=\"cb54-2\"><a href=\"#cb54-2\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    students<span class=\"op\">,<\/span><\/span>\n<span id=\"cb54-3\"><a href=\"#cb54-3\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"kw\">sizeof<\/span><span class=\"op\">(<\/span>Student<span class=\"op\">),<\/span><\/span>\n<span id=\"cb54-4\"><a href=\"#cb54-4\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    count<span class=\"op\">,<\/span><\/span>\n<span id=\"cb54-5\"><a href=\"#cb54-5\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    fp<\/span>\n<span id=\"cb54-6\"><a href=\"#cb54-6\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"op\">);<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u5341\u516b\u3001\u8bfb\u53d6\u6587\u4ef6<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">\u7a0b\u5e8f\u542f\u52a8\u65f6\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>students.dat\n\u2193\nfread\n\u2193\nstudents<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e8e\u662f\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u4e0a\u6b21\u7684\u6570\u636e\n\u2193\n\u672c\u6b21\u542f\u52a8\u7ee7\u7eed\u4f7f\u7528<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u5c31\u662f\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u6570\u636e\u6301\u4e45\u5316\u3002<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u5341\u4e5d\u3001\u5b66\u751f\u7ba1\u7406\u7cfb\u7edf\u6587\u4ef6\u7ed3\u6784<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">\u5230\u8fd9\u91cc\u5c31\u4e0d\u80fd\u518d\u628a\u6240\u6709\u4ee3\u7801\u5168\u90e8\u5806\u5728 <code>main.c<\/code>\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u63a8\u8350\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>student_manager\/\n\u2502\n\u251c\u2500 main.c\n\u2502\n\u251c\u2500 student.c\n\u251c\u2500 student.h\n\u2502\n\u251c\u2500 file.c\n\u251c\u2500 file.h\n\u2502\n\u251c\u2500 config.h\n\u2502\n\u2514\u2500 Makefile<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u4e8c\u5341\u3001student.h<\/h1>\n\n\n\n<div class=\"sourceCode\" id=\"cb58\"><pre class=\"sourceCode c\"><code class=\"sourceCode c\"><span id=\"cb58-1\"><a href=\"#cb58-1\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"pp\">#ifndef STUDENT_H<\/span><\/span>\n<span id=\"cb58-2\"><a href=\"#cb58-2\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"pp\">#define STUDENT_H<\/span><\/span>\n<span id=\"cb58-3\"><a href=\"#cb58-3\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><\/span>\n<span id=\"cb58-4\"><a href=\"#cb58-4\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"kw\">typedef<\/span> <span class=\"kw\">struct<\/span> <span class=\"op\">{<\/span><\/span>\n<span id=\"cb58-5\"><a href=\"#cb58-5\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"dt\">int<\/span> id<span class=\"op\">;<\/span><\/span>\n<span id=\"cb58-6\"><a href=\"#cb58-6\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"dt\">char<\/span> name<span class=\"op\">[<\/span><span class=\"dv\">50<\/span><span class=\"op\">];<\/span><\/span>\n<span id=\"cb58-7\"><a href=\"#cb58-7\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"dt\">int<\/span> age<span class=\"op\">;<\/span><\/span>\n<span id=\"cb58-8\"><a href=\"#cb58-8\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"dt\">double<\/span> score<span class=\"op\">;<\/span><\/span>\n<span id=\"cb58-9\"><a href=\"#cb58-9\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"op\">}<\/span> Student<span class=\"op\">;<\/span><\/span>\n<span id=\"cb58-10\"><a href=\"#cb58-10\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><\/span>\n<span id=\"cb58-11\"><a href=\"#cb58-11\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"dt\">void<\/span> add_student<span class=\"op\">(<\/span><\/span>\n<span id=\"cb58-12\"><a href=\"#cb58-12\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    Student <span class=\"op\">*<\/span>students<span class=\"op\">,<\/span><\/span>\n<span id=\"cb58-13\"><a href=\"#cb58-13\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"dt\">int<\/span> <span class=\"op\">*<\/span>count<\/span>\n<span id=\"cb58-14\"><a href=\"#cb58-14\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"op\">);<\/span><\/span>\n<span id=\"cb58-15\"><a href=\"#cb58-15\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><\/span>\n<span id=\"cb58-16\"><a href=\"#cb58-16\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"dt\">void<\/span> print_students<span class=\"op\">(<\/span><\/span>\n<span id=\"cb58-17\"><a href=\"#cb58-17\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    Student <span class=\"op\">*<\/span>students<span class=\"op\">,<\/span><\/span>\n<span id=\"cb58-18\"><a href=\"#cb58-18\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"dt\">int<\/span> count<\/span>\n<span id=\"cb58-19\"><a href=\"#cb58-19\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"op\">);<\/span><\/span>\n<span id=\"cb58-20\"><a href=\"#cb58-20\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><\/span>\n<span id=\"cb58-21\"><a href=\"#cb58-21\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>Student <span class=\"op\">*<\/span>find_student<span class=\"op\">(<\/span><\/span>\n<span id=\"cb58-22\"><a href=\"#cb58-22\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    Student <span class=\"op\">*<\/span>students<span class=\"op\">,<\/span><\/span>\n<span id=\"cb58-23\"><a href=\"#cb58-23\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"dt\">int<\/span> count<span class=\"op\">,<\/span><\/span>\n<span id=\"cb58-24\"><a href=\"#cb58-24\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"dt\">int<\/span> id<\/span>\n<span id=\"cb58-25\"><a href=\"#cb58-25\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"op\">);<\/span><\/span>\n<span id=\"cb58-26\"><a href=\"#cb58-26\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><\/span>\n<span id=\"cb58-27\"><a href=\"#cb58-27\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"dt\">void<\/span> delete_student<span class=\"op\">(<\/span><\/span>\n<span id=\"cb58-28\"><a href=\"#cb58-28\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    Student <span class=\"op\">*<\/span>students<span class=\"op\">,<\/span><\/span>\n<span id=\"cb58-29\"><a href=\"#cb58-29\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"dt\">int<\/span> <span class=\"op\">*<\/span>count<\/span>\n<span id=\"cb58-30\"><a href=\"#cb58-30\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"op\">);<\/span><\/span>\n<span id=\"cb58-31\"><a href=\"#cb58-31\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><\/span>\n<span id=\"cb58-32\"><a href=\"#cb58-32\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"dt\">void<\/span> modify_student<span class=\"op\">(<\/span><\/span>\n<span id=\"cb58-33\"><a href=\"#cb58-33\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    Student <span class=\"op\">*<\/span>students<span class=\"op\">,<\/span><\/span>\n<span id=\"cb58-34\"><a href=\"#cb58-34\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"dt\">int<\/span> count<\/span>\n<span id=\"cb58-35\"><a href=\"#cb58-35\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"op\">);<\/span><\/span>\n<span id=\"cb58-36\"><a href=\"#cb58-36\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><\/span>\n<span id=\"cb58-37\"><a href=\"#cb58-37\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"pp\">#endif<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u91cc\u653e\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u7ed3\u6784\u4f53\n+\n\u51fd\u6570\u58f0\u660e<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u4e8c\u5341\u4e00\u3001file.h<\/h1>\n\n\n\n<div class=\"sourceCode\" id=\"cb60\"><pre class=\"sourceCode c\"><code class=\"sourceCode c\"><span id=\"cb60-1\"><a href=\"#cb60-1\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"pp\">#ifndef FILE_H<\/span><\/span>\n<span id=\"cb60-2\"><a href=\"#cb60-2\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"pp\">#define FILE_H<\/span><\/span>\n<span id=\"cb60-3\"><a href=\"#cb60-3\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><\/span>\n<span id=\"cb60-4\"><a href=\"#cb60-4\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"pp\">#include <\/span><span class=\"im\">\"student.h\"<\/span><\/span>\n<span id=\"cb60-5\"><a href=\"#cb60-5\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><\/span>\n<span id=\"cb60-6\"><a href=\"#cb60-6\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"dt\">int<\/span> save_students<span class=\"op\">(<\/span><\/span>\n<span id=\"cb60-7\"><a href=\"#cb60-7\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"dt\">const<\/span> <span class=\"dt\">char<\/span> <span class=\"op\">*<\/span>filename<span class=\"op\">,<\/span><\/span>\n<span id=\"cb60-8\"><a href=\"#cb60-8\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    Student <span class=\"op\">*<\/span>students<span class=\"op\">,<\/span><\/span>\n<span id=\"cb60-9\"><a href=\"#cb60-9\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"dt\">int<\/span> count<\/span>\n<span id=\"cb60-10\"><a href=\"#cb60-10\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"op\">);<\/span><\/span>\n<span id=\"cb60-11\"><a href=\"#cb60-11\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><\/span>\n<span id=\"cb60-12\"><a href=\"#cb60-12\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"dt\">int<\/span> load_students<span class=\"op\">(<\/span><\/span>\n<span id=\"cb60-13\"><a href=\"#cb60-13\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"dt\">const<\/span> <span class=\"dt\">char<\/span> <span class=\"op\">*<\/span>filename<span class=\"op\">,<\/span><\/span>\n<span id=\"cb60-14\"><a href=\"#cb60-14\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    Student <span class=\"op\">*<\/span>students<span class=\"op\">,<\/span><\/span>\n<span id=\"cb60-15\"><a href=\"#cb60-15\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"dt\">int<\/span> <span class=\"op\">*<\/span>count<\/span>\n<span id=\"cb60-16\"><a href=\"#cb60-16\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"op\">);<\/span><\/span>\n<span id=\"cb60-17\"><a href=\"#cb60-17\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><\/span>\n<span id=\"cb60-18\"><a href=\"#cb60-18\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"pp\">#endif<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u4e8c\u5341\u4e8c\u3001main.c<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\"><code>main.c<\/code> \u4e3b\u8981\u8d1f\u8d23\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u83dc\u5355\n\u6d41\u7a0b\u63a7\u5236\n\u8c03\u7528\u6a21\u5757<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f8b\u5982\uff1a<\/p>\n\n\n\n<div class=\"sourceCode\" id=\"cb62\"><pre class=\"sourceCode c\"><code class=\"sourceCode c\"><span id=\"cb62-1\"><a href=\"#cb62-1\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"pp\">#include <\/span><span class=\"im\">&lt;stdio.h&gt;<\/span><\/span>\n<span id=\"cb62-2\"><a href=\"#cb62-2\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"pp\">#include <\/span><span class=\"im\">\"student.h\"<\/span><\/span>\n<span id=\"cb62-3\"><a href=\"#cb62-3\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"pp\">#include <\/span><span class=\"im\">\"file.h\"<\/span><\/span>\n<span id=\"cb62-4\"><a href=\"#cb62-4\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><\/span>\n<span id=\"cb62-5\"><a href=\"#cb62-5\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"dt\">int<\/span> main<span class=\"op\">()<\/span> <span class=\"op\">{<\/span><\/span>\n<span id=\"cb62-6\"><a href=\"#cb62-6\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><\/span>\n<span id=\"cb62-7\"><a href=\"#cb62-7\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    Student students<span class=\"op\">[<\/span><span class=\"dv\">100<\/span><span class=\"op\">];<\/span><\/span>\n<span id=\"cb62-8\"><a href=\"#cb62-8\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"dt\">int<\/span> count <span class=\"op\">=<\/span> <span class=\"dv\">0<\/span><span class=\"op\">;<\/span><\/span>\n<span id=\"cb62-9\"><a href=\"#cb62-9\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><\/span>\n<span id=\"cb62-10\"><a href=\"#cb62-10\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"cf\">while<\/span> <span class=\"op\">(<\/span><span class=\"dv\">1<\/span><span class=\"op\">)<\/span> <span class=\"op\">{<\/span><\/span>\n<span id=\"cb62-11\"><a href=\"#cb62-11\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><\/span>\n<span id=\"cb62-12\"><a href=\"#cb62-12\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>        printf<span class=\"op\">(<\/span><span class=\"st\">\"<\/span><span class=\"sc\">\\n<\/span><span class=\"st\">\"<\/span><span class=\"op\">);<\/span><\/span>\n<span id=\"cb62-13\"><a href=\"#cb62-13\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>        printf<span class=\"op\">(<\/span><span class=\"st\">\"1. \u6dfb\u52a0\u5b66\u751f<\/span><span class=\"sc\">\\n<\/span><span class=\"st\">\"<\/span><span class=\"op\">);<\/span><\/span>\n<span id=\"cb62-14\"><a href=\"#cb62-14\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>        printf<span class=\"op\">(<\/span><span class=\"st\">\"2. \u5220\u9664\u5b66\u751f<\/span><span class=\"sc\">\\n<\/span><span class=\"st\">\"<\/span><span class=\"op\">);<\/span><\/span>\n<span id=\"cb62-15\"><a href=\"#cb62-15\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>        printf<span class=\"op\">(<\/span><span class=\"st\">\"3. \u4fee\u6539\u5b66\u751f<\/span><span class=\"sc\">\\n<\/span><span class=\"st\">\"<\/span><span class=\"op\">);<\/span><\/span>\n<span id=\"cb62-16\"><a href=\"#cb62-16\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>        printf<span class=\"op\">(<\/span><span class=\"st\">\"4. \u67e5\u8be2\u5b66\u751f<\/span><span class=\"sc\">\\n<\/span><span class=\"st\">\"<\/span><span class=\"op\">);<\/span><\/span>\n<span id=\"cb62-17\"><a href=\"#cb62-17\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>        printf<span class=\"op\">(<\/span><span class=\"st\">\"5. \u663e\u793a\u5168\u90e8<\/span><span class=\"sc\">\\n<\/span><span class=\"st\">\"<\/span><span class=\"op\">);<\/span><\/span>\n<span id=\"cb62-18\"><a href=\"#cb62-18\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>        printf<span class=\"op\">(<\/span><span class=\"st\">\"6. \u4fdd\u5b58<\/span><span class=\"sc\">\\n<\/span><span class=\"st\">\"<\/span><span class=\"op\">);<\/span><\/span>\n<span id=\"cb62-19\"><a href=\"#cb62-19\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>        printf<span class=\"op\">(<\/span><span class=\"st\">\"7. \u8bfb\u53d6<\/span><span class=\"sc\">\\n<\/span><span class=\"st\">\"<\/span><span class=\"op\">);<\/span><\/span>\n<span id=\"cb62-20\"><a href=\"#cb62-20\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>        printf<span class=\"op\">(<\/span><span class=\"st\">\"0. \u9000\u51fa<\/span><span class=\"sc\">\\n<\/span><span class=\"st\">\"<\/span><span class=\"op\">);<\/span><\/span>\n<span id=\"cb62-21\"><a href=\"#cb62-21\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><\/span>\n<span id=\"cb62-22\"><a href=\"#cb62-22\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>        <span class=\"dt\">int<\/span> choice<span class=\"op\">;<\/span><\/span>\n<span id=\"cb62-23\"><a href=\"#cb62-23\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>        scanf<span class=\"op\">(<\/span><span class=\"st\">\"<\/span><span class=\"sc\">%d<\/span><span class=\"st\">\"<\/span><span class=\"op\">,<\/span> <span class=\"op\">&amp;<\/span>choice<span class=\"op\">);<\/span><\/span>\n<span id=\"cb62-24\"><a href=\"#cb62-24\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><\/span>\n<span id=\"cb62-25\"><a href=\"#cb62-25\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>        <span class=\"cf\">switch<\/span> <span class=\"op\">(<\/span>choice<span class=\"op\">)<\/span> <span class=\"op\">{<\/span><\/span>\n<span id=\"cb62-26\"><a href=\"#cb62-26\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><\/span>\n<span id=\"cb62-27\"><a href=\"#cb62-27\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>            <span class=\"cf\">case<\/span> <span class=\"dv\">1<\/span><span class=\"op\">:<\/span><\/span>\n<span id=\"cb62-28\"><a href=\"#cb62-28\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>                add_student<span class=\"op\">(<\/span>students<span class=\"op\">,<\/span> <span class=\"op\">&amp;<\/span>count<span class=\"op\">);<\/span><\/span>\n<span id=\"cb62-29\"><a href=\"#cb62-29\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>                <span class=\"cf\">break<\/span><span class=\"op\">;<\/span><\/span>\n<span id=\"cb62-30\"><a href=\"#cb62-30\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><\/span>\n<span id=\"cb62-31\"><a href=\"#cb62-31\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>            <span class=\"cf\">case<\/span> <span class=\"dv\">2<\/span><span class=\"op\">:<\/span><\/span>\n<span id=\"cb62-32\"><a href=\"#cb62-32\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>                delete_student<span class=\"op\">(<\/span>students<span class=\"op\">,<\/span> <span class=\"op\">&amp;<\/span>count<span class=\"op\">);<\/span><\/span>\n<span id=\"cb62-33\"><a href=\"#cb62-33\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>                <span class=\"cf\">break<\/span><span class=\"op\">;<\/span><\/span>\n<span id=\"cb62-34\"><a href=\"#cb62-34\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><\/span>\n<span id=\"cb62-35\"><a href=\"#cb62-35\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>            <span class=\"cf\">case<\/span> <span class=\"dv\">3<\/span><span class=\"op\">:<\/span><\/span>\n<span id=\"cb62-36\"><a href=\"#cb62-36\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>                modify_student<span class=\"op\">(<\/span>students<span class=\"op\">,<\/span> count<span class=\"op\">);<\/span><\/span>\n<span id=\"cb62-37\"><a href=\"#cb62-37\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>                <span class=\"cf\">break<\/span><span class=\"op\">;<\/span><\/span>\n<span id=\"cb62-38\"><a href=\"#cb62-38\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><\/span>\n<span id=\"cb62-39\"><a href=\"#cb62-39\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>            <span class=\"cf\">case<\/span> <span class=\"dv\">5<\/span><span class=\"op\">:<\/span><\/span>\n<span id=\"cb62-40\"><a href=\"#cb62-40\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>                print_students<span class=\"op\">(<\/span>students<span class=\"op\">,<\/span> count<span class=\"op\">);<\/span><\/span>\n<span id=\"cb62-41\"><a href=\"#cb62-41\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>                <span class=\"cf\">break<\/span><span class=\"op\">;<\/span><\/span>\n<span id=\"cb62-42\"><a href=\"#cb62-42\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><\/span>\n<span id=\"cb62-43\"><a href=\"#cb62-43\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>            <span class=\"cf\">case<\/span> <span class=\"dv\">6<\/span><span class=\"op\">:<\/span><\/span>\n<span id=\"cb62-44\"><a href=\"#cb62-44\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>                save_students<span class=\"op\">(<\/span><\/span>\n<span id=\"cb62-45\"><a href=\"#cb62-45\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>                    <span class=\"st\">\"students.dat\"<\/span><span class=\"op\">,<\/span><\/span>\n<span id=\"cb62-46\"><a href=\"#cb62-46\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>                    students<span class=\"op\">,<\/span><\/span>\n<span id=\"cb62-47\"><a href=\"#cb62-47\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>                    count<\/span>\n<span id=\"cb62-48\"><a href=\"#cb62-48\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>                <span class=\"op\">);<\/span><\/span>\n<span id=\"cb62-49\"><a href=\"#cb62-49\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>                <span class=\"cf\">break<\/span><span class=\"op\">;<\/span><\/span>\n<span id=\"cb62-50\"><a href=\"#cb62-50\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><\/span>\n<span id=\"cb62-51\"><a href=\"#cb62-51\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>            <span class=\"cf\">case<\/span> <span class=\"dv\">7<\/span><span class=\"op\">:<\/span><\/span>\n<span id=\"cb62-52\"><a href=\"#cb62-52\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>                load_students<span class=\"op\">(<\/span><\/span>\n<span id=\"cb62-53\"><a href=\"#cb62-53\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>                    <span class=\"st\">\"students.dat\"<\/span><span class=\"op\">,<\/span><\/span>\n<span id=\"cb62-54\"><a href=\"#cb62-54\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>                    students<span class=\"op\">,<\/span><\/span>\n<span id=\"cb62-55\"><a href=\"#cb62-55\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>                    <span class=\"op\">&amp;<\/span>count<\/span>\n<span id=\"cb62-56\"><a href=\"#cb62-56\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>                <span class=\"op\">);<\/span><\/span>\n<span id=\"cb62-57\"><a href=\"#cb62-57\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>                <span class=\"cf\">break<\/span><span class=\"op\">;<\/span><\/span>\n<span id=\"cb62-58\"><a href=\"#cb62-58\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><\/span>\n<span id=\"cb62-59\"><a href=\"#cb62-59\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>            <span class=\"cf\">case<\/span> <span class=\"dv\">0<\/span><span class=\"op\">:<\/span><\/span>\n<span id=\"cb62-60\"><a href=\"#cb62-60\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>                <span class=\"cf\">return<\/span> <span class=\"dv\">0<\/span><span class=\"op\">;<\/span><\/span>\n<span id=\"cb62-61\"><a href=\"#cb62-61\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>        <span class=\"op\">}<\/span><\/span>\n<span id=\"cb62-62\"><a href=\"#cb62-62\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"op\">}<\/span><\/span>\n<span id=\"cb62-63\"><a href=\"#cb62-63\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"op\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u91cc\u6ca1\u6709\u5b9e\u73b0\u5177\u4f53\u529f\u80fd\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u6b63\u662f\u591a\u6587\u4ef6\u7f16\u7a0b\u7684\u610f\u4e49\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>main.c\n\u2193\n\u8d1f\u8d23\u201c\u8c03\u7528\u8c01\u201d<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u800c\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>student.c\n\u2193\n\u8d1f\u8d23\u201c\u5b66\u751f\u529f\u80fd\u600e\u4e48\u5b9e\u73b0\u201d<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u4e8c\u5341\u4e09\u3001\u5b66\u751f\u7ba1\u7406\u7cfb\u7edf\u5347\u7ea7\uff1a\u52a8\u6001\u5185\u5b58<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">\u628a\uff1a<\/p>\n\n\n\n<div class=\"sourceCode\" id=\"cb65\"><pre class=\"sourceCode c\"><code class=\"sourceCode c\"><span id=\"cb65-1\"><a href=\"#cb65-1\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>Student students<span class=\"op\">[<\/span><span class=\"dv\">100<\/span><span class=\"op\">];<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u5347\u7ea7\u4e3a\uff1a<\/p>\n\n\n\n<div class=\"sourceCode\" id=\"cb66\"><pre class=\"sourceCode c\"><code class=\"sourceCode c\"><span id=\"cb66-1\"><a href=\"#cb66-1\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>Student <span class=\"op\">*<\/span>students<span class=\"op\">;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u7136\u540e\uff1a<\/p>\n\n\n\n<div class=\"sourceCode\" id=\"cb67\"><pre class=\"sourceCode c\"><code class=\"sourceCode c\"><span id=\"cb67-1\"><a href=\"#cb67-1\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"dt\">int<\/span> capacity <span class=\"op\">=<\/span> <span class=\"dv\">10<\/span><span class=\"op\">;<\/span><\/span>\n<span id=\"cb67-2\"><a href=\"#cb67-2\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"dt\">int<\/span> count <span class=\"op\">=<\/span> <span class=\"dv\">0<\/span><span class=\"op\">;<\/span><\/span>\n<span id=\"cb67-3\"><a href=\"#cb67-3\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><\/span>\n<span id=\"cb67-4\"><a href=\"#cb67-4\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>students <span class=\"op\">=<\/span> malloc<span class=\"op\">(<\/span><\/span>\n<span id=\"cb67-5\"><a href=\"#cb67-5\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"kw\">sizeof<\/span><span class=\"op\">(<\/span>Student<span class=\"op\">)<\/span> <span class=\"op\">*<\/span> capacity<\/span>\n<span id=\"cb67-6\"><a href=\"#cb67-6\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"op\">);<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c\u6ee1\u4e86\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>count == capacity\n\u2193\nrealloc\n\u2193\n\u6269\u5927\u7a7a\u95f4<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f8b\u5982\uff1a<\/p>\n\n\n\n<div class=\"sourceCode\" id=\"cb69\"><pre class=\"sourceCode c\"><code class=\"sourceCode c\"><span id=\"cb69-1\"><a href=\"#cb69-1\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>Student <span class=\"op\">*<\/span>temp <span class=\"op\">=<\/span> realloc<span class=\"op\">(<\/span><\/span>\n<span id=\"cb69-2\"><a href=\"#cb69-2\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    students<span class=\"op\">,<\/span><\/span>\n<span id=\"cb69-3\"><a href=\"#cb69-3\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"kw\">sizeof<\/span><span class=\"op\">(<\/span>Student<span class=\"op\">)<\/span> <span class=\"op\">*<\/span> capacity <span class=\"op\">*<\/span> <span class=\"dv\">2<\/span><\/span>\n<span id=\"cb69-4\"><a href=\"#cb69-4\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"op\">);<\/span><\/span>\n<span id=\"cb69-5\"><a href=\"#cb69-5\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><\/span>\n<span id=\"cb69-6\"><a href=\"#cb69-6\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"cf\">if<\/span> <span class=\"op\">(<\/span>temp <span class=\"op\">!=<\/span> NULL<span class=\"op\">)<\/span> <span class=\"op\">{<\/span><\/span>\n<span id=\"cb69-7\"><a href=\"#cb69-7\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    students <span class=\"op\">=<\/span> temp<span class=\"op\">;<\/span><\/span>\n<span id=\"cb69-8\"><a href=\"#cb69-8\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    capacity <span class=\"op\">*=<\/span> <span class=\"dv\">2<\/span><span class=\"op\">;<\/span><\/span>\n<span id=\"cb69-9\"><a href=\"#cb69-9\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"op\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u6837\u5c31\u5f62\u6210\u4e86\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u7ed3\u6784\u4f53\n+\n\u6307\u9488\n+\nmalloc\n+\nrealloc\n+\nfree<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u4e8c\u5341\u56db\u3001\u9879\u76ee 3\uff1a\u8bfe\u7a0b\u8868\u7ba1\u7406\u7cfb\u7edf<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u4e2a\u9879\u76ee\u975e\u5e38\u9002\u5408\u62ff\u6765\u4f5c\u4e3a\u6700\u7ec8\u9879\u76ee\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u56e0\u4e3a\u4f60\u4e4b\u524d\u5df2\u7ecf\u5b9e\u9645\u505a\u8fc7\u8bfe\u7a0b\u8868\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u76ee\u6807\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u8bfe\u7a0b\u6dfb\u52a0\n\u8bfe\u7a0b\u5220\u9664\n\u8bfe\u7a0b\u4fee\u6539\n\u67e5\u8be2\u8bfe\u7a0b\n\u663e\u793a\u8bfe\u7a0b\u8868\n\u4fdd\u5b58\u8bfe\u7a0b\u8868\n\u8bfb\u53d6\u8bfe\u7a0b\u8868<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u4e8c\u5341\u4e94\u3001\u8bfe\u7a0b\u6570\u636e\u7ed3\u6784<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">\u53ef\u4ee5\u8bbe\u8ba1\uff1a<\/p>\n\n\n\n<div class=\"sourceCode\" id=\"cb72\"><pre class=\"sourceCode c\"><code class=\"sourceCode c\"><span id=\"cb72-1\"><a href=\"#cb72-1\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"kw\">typedef<\/span> <span class=\"kw\">struct<\/span> <span class=\"op\">{<\/span><\/span>\n<span id=\"cb72-2\"><a href=\"#cb72-2\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"dt\">char<\/span> name<span class=\"op\">[<\/span><span class=\"dv\">100<\/span><span class=\"op\">];<\/span><\/span>\n<span id=\"cb72-3\"><a href=\"#cb72-3\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"dt\">char<\/span> teacher<span class=\"op\">[<\/span><span class=\"dv\">100<\/span><span class=\"op\">];<\/span><\/span>\n<span id=\"cb72-4\"><a href=\"#cb72-4\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"dt\">char<\/span> room<span class=\"op\">[<\/span><span class=\"dv\">100<\/span><span class=\"op\">];<\/span><\/span>\n<span id=\"cb72-5\"><a href=\"#cb72-5\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"dt\">int<\/span> day<span class=\"op\">;<\/span><\/span>\n<span id=\"cb72-6\"><a href=\"#cb72-6\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"dt\">int<\/span> period<span class=\"op\">;<\/span><\/span>\n<span id=\"cb72-7\"><a href=\"#cb72-7\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"op\">}<\/span> Course<span class=\"op\">;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee3\u8868\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u8bfe\u7a0b\u540d\u79f0\n\u6559\u5e08\n\u6559\u5ba4\n\u661f\u671f\n\u7b2c\u51e0\u8282<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f8b\u5982\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>C\u8bed\u8a00\n\u5f20\u8001\u5e08\nA101\n\u661f\u671f\u4e00\n\u7b2c1\u8282<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u4e8c\u5341\u516d\u3001\u8bfe\u7a0b\u8868\u7684\u6570\u636e<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c\u56fa\u5b9a\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>7 \u5929\n6 \u8282<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u53ef\u4ee5\uff1a<\/p>\n\n\n\n<div class=\"sourceCode\" id=\"cb76\"><pre class=\"sourceCode c\"><code class=\"sourceCode c\"><span id=\"cb76-1\"><a href=\"#cb76-1\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>Course courses<span class=\"op\">[<\/span><span class=\"dv\">7<\/span><span class=\"op\">][<\/span><span class=\"dv\">6<\/span><span class=\"op\">];<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f46\u662f\u5982\u679c\u8bfe\u7a0b\u6570\u91cf\u4e0d\u56fa\u5b9a\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Course *courses;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u518d\u914d\u5408\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>malloc\nrealloc\nfree<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u5c31\u53ef\u4ee5\u505a\u52a8\u6001\u8bfe\u7a0b\u5217\u8868\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u4e8c\u5341\u4e03\u3001\u8bfe\u7a0b\u8868\u83dc\u5355<\/h1>\n\n\n\n<pre class=\"wp-block-code\"><code>========== \u8bfe\u7a0b\u8868\u7ba1\u7406 =========\n\n1. \u6dfb\u52a0\u8bfe\u7a0b\n2. \u5220\u9664\u8bfe\u7a0b\n3. \u4fee\u6539\u8bfe\u7a0b\n4. \u67e5\u8be2\u8bfe\u7a0b\n5. \u663e\u793a\u8bfe\u7a0b\u8868\n6. \u4fdd\u5b58\u8bfe\u7a0b\u8868\n7. \u8bfb\u53d6\u8bfe\u7a0b\u8868\n0. \u9000\u51fa<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u4e8c\u5341\u516b\u3001\u663e\u793a\u8bfe\u7a0b\u8868<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f8b\u5982\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>          \u7b2c1\u8282       \u7b2c2\u8282       \u7b2c3\u8282\n\u661f\u671f\u4e00    C\u8bed\u8a00       \u6570\u5b66         \u82f1\u8bed\n\u661f\u671f\u4e8c    \u7269\u7406        \u8ba1\u7b97\u673a       \u4f53\u80b2\n\u661f\u671f\u4e09    ...<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u91cc\u4e3b\u8981\u4f7f\u7528\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u4e8c\u7ef4\u6570\u7ec4\nfor\n\u7ed3\u6784\u4f53\n\u5b57\u7b26\u4e32<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u4e8c\u5341\u4e5d\u3001\u8bfe\u7a0b\u51b2\u7a81\u68c0\u67e5<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u662f\u4e00\u4e2a\u5f88\u6709\u610f\u601d\u7684\u529f\u80fd\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f8b\u5982\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u661f\u671f\u4e00\n\u7b2c1\u8282<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u5df2\u7ecf\u6709\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>C\u8bed\u8a00<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u90a3\u4e48\u518d\u6b21\u6dfb\u52a0\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u6570\u5b66\n\u661f\u671f\u4e00\n\u7b2c1\u8282<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u5c31\u5e94\u8be5\u63d0\u793a\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u8bfe\u7a0b\u65f6\u95f4\u51b2\u7a81\uff01<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u903b\u8f91\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u904d\u5386\u73b0\u6709\u8bfe\u7a0b\n\u2193\n\u6bd4\u8f83 day\n\u2193\n\u6bd4\u8f83 period\n\u2193\n\u76f8\u540c\uff1f\n\u2193\n\u51b2\u7a81<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u4e09\u5341\u3001\u8bfe\u7a0b\u8868\u6587\u4ef6\u4fdd\u5b58<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">\u53ef\u4ee5\u4f7f\u7528\u4e8c\u8fdb\u5236\uff1a<\/p>\n\n\n\n<div class=\"sourceCode\" id=\"cb87\"><pre class=\"sourceCode c\"><code class=\"sourceCode c\"><span id=\"cb87-1\"><a href=\"#cb87-1\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>fwrite<span class=\"op\">(<\/span><\/span>\n<span id=\"cb87-2\"><a href=\"#cb87-2\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    courses<span class=\"op\">,<\/span><\/span>\n<span id=\"cb87-3\"><a href=\"#cb87-3\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"kw\">sizeof<\/span><span class=\"op\">(<\/span>Course<span class=\"op\">),<\/span><\/span>\n<span id=\"cb87-4\"><a href=\"#cb87-4\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    count<span class=\"op\">,<\/span><\/span>\n<span id=\"cb87-5\"><a href=\"#cb87-5\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    fp<\/span>\n<span id=\"cb87-6\"><a href=\"#cb87-6\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"op\">);<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e5f\u53ef\u4ee5\u4fdd\u5b58\u6210\u6587\u672c\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f8b\u5982\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>C\u8bed\u8a00|\u5f20\u8001\u5e08|A101|1|1\n\u6570\u5b66|\u674e\u8001\u5e08|B202|1|2<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u4e09\u5341\u4e00\u3001\u8fdb\u4e00\u6b65\uff1aJSON<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c\u4ee5\u540e\u5e0c\u671b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>C \u7a0b\u5e8f\n\u2193\n\u751f\u6210 JSON\n\u2193\n\u7f51\u9875\n\u2193\n\u624b\u673a App<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u90a3\u4e48\u53ef\u4ee5\u8bbe\u8ba1\uff1a<\/p>\n\n\n\n<div class=\"sourceCode\" id=\"cb90\"><pre class=\"sourceCode json\"><code class=\"sourceCode json\"><span id=\"cb90-1\"><a href=\"#cb90-1\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"fu\">{<\/span><\/span>\n<span id=\"cb90-2\"><a href=\"#cb90-2\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"dt\">\"name\"<\/span><span class=\"fu\">:<\/span> <span class=\"st\">\"C\u8bed\u8a00\"<\/span><span class=\"fu\">,<\/span><\/span>\n<span id=\"cb90-3\"><a href=\"#cb90-3\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"dt\">\"teacher\"<\/span><span class=\"fu\">:<\/span> <span class=\"st\">\"\u5f20\u8001\u5e08\"<\/span><span class=\"fu\">,<\/span><\/span>\n<span id=\"cb90-4\"><a href=\"#cb90-4\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"dt\">\"room\"<\/span><span class=\"fu\">:<\/span> <span class=\"st\">\"A101\"<\/span><span class=\"fu\">,<\/span><\/span>\n<span id=\"cb90-5\"><a href=\"#cb90-5\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"dt\">\"day\"<\/span><span class=\"fu\">:<\/span> <span class=\"dv\">1<\/span><span class=\"fu\">,<\/span><\/span>\n<span id=\"cb90-6\"><a href=\"#cb90-6\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"dt\">\"period\"<\/span><span class=\"fu\">:<\/span> <span class=\"dv\">1<\/span><\/span>\n<span id=\"cb90-7\"><a href=\"#cb90-7\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"fu\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0d\u8fc7\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>JSON \u5e76\u4e0d\u662f C \u6807\u51c6\u5e93\u81ea\u5e26\u7684\u6587\u4ef6\u683c\u5f0f\u3002<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u9700\u8981\u81ea\u5df1\u5199 JSON \u751f\u6210\/\u89e3\u6790\u4ee3\u7801\uff0c\u6216\u8005\u4f7f\u7528\u7b2c\u4e09\u65b9 JSON \u5e93\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5f53\u524d\u57fa\u7840\u8bfe\u7a0b\u4e0d\u5fc5\u9a6c\u4e0a\u6df1\u5165\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u4e09\u5341\u4e8c\u3001\u6700\u7ec8\u9879\u76ee\u67b6\u6784<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c\u628a\u8bfe\u7a0b\u8868\u505a\u5230\u6bd4\u8f83\u5b8c\u6574\uff0c\u53ef\u4ee5\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>course_manager\/\n\u2502\n\u251c\u2500 main.c\n\u2502\n\u251c\u2500 course.c\n\u251c\u2500 course.h\n\u2502\n\u251c\u2500 file.c\n\u251c\u2500 file.h\n\u2502\n\u251c\u2500 config.h\n\u2502\n\u251c\u2500 Makefile\n\u2502\n\u2514\u2500 data\/\n   \u2514\u2500 courses.dat<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u4e09\u5341\u4e09\u3001course.h<\/h1>\n\n\n\n<div class=\"sourceCode\" id=\"cb92\"><pre class=\"sourceCode c\"><code class=\"sourceCode c\"><span id=\"cb92-1\"><a href=\"#cb92-1\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"pp\">#ifndef COURSE_H<\/span><\/span>\n<span id=\"cb92-2\"><a href=\"#cb92-2\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"pp\">#define COURSE_H<\/span><\/span>\n<span id=\"cb92-3\"><a href=\"#cb92-3\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><\/span>\n<span id=\"cb92-4\"><a href=\"#cb92-4\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"kw\">typedef<\/span> <span class=\"kw\">struct<\/span> <span class=\"op\">{<\/span><\/span>\n<span id=\"cb92-5\"><a href=\"#cb92-5\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"dt\">char<\/span> name<span class=\"op\">[<\/span><span class=\"dv\">100<\/span><span class=\"op\">];<\/span><\/span>\n<span id=\"cb92-6\"><a href=\"#cb92-6\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"dt\">char<\/span> teacher<span class=\"op\">[<\/span><span class=\"dv\">100<\/span><span class=\"op\">];<\/span><\/span>\n<span id=\"cb92-7\"><a href=\"#cb92-7\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"dt\">char<\/span> room<span class=\"op\">[<\/span><span class=\"dv\">100<\/span><span class=\"op\">];<\/span><\/span>\n<span id=\"cb92-8\"><a href=\"#cb92-8\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"dt\">int<\/span> day<span class=\"op\">;<\/span><\/span>\n<span id=\"cb92-9\"><a href=\"#cb92-9\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"dt\">int<\/span> period<span class=\"op\">;<\/span><\/span>\n<span id=\"cb92-10\"><a href=\"#cb92-10\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"op\">}<\/span> Course<span class=\"op\">;<\/span><\/span>\n<span id=\"cb92-11\"><a href=\"#cb92-11\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><\/span>\n<span id=\"cb92-12\"><a href=\"#cb92-12\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"dt\">void<\/span> add_course<span class=\"op\">(<\/span><\/span>\n<span id=\"cb92-13\"><a href=\"#cb92-13\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    Course <span class=\"op\">**<\/span>courses<span class=\"op\">,<\/span><\/span>\n<span id=\"cb92-14\"><a href=\"#cb92-14\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"dt\">int<\/span> <span class=\"op\">*<\/span>count<span class=\"op\">,<\/span><\/span>\n<span id=\"cb92-15\"><a href=\"#cb92-15\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"dt\">int<\/span> <span class=\"op\">*<\/span>capacity<\/span>\n<span id=\"cb92-16\"><a href=\"#cb92-16\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"op\">);<\/span><\/span>\n<span id=\"cb92-17\"><a href=\"#cb92-17\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><\/span>\n<span id=\"cb92-18\"><a href=\"#cb92-18\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"dt\">void<\/span> delete_course<span class=\"op\">(<\/span><\/span>\n<span id=\"cb92-19\"><a href=\"#cb92-19\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    Course <span class=\"op\">*<\/span>courses<span class=\"op\">,<\/span><\/span>\n<span id=\"cb92-20\"><a href=\"#cb92-20\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"dt\">int<\/span> <span class=\"op\">*<\/span>count<\/span>\n<span id=\"cb92-21\"><a href=\"#cb92-21\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"op\">);<\/span><\/span>\n<span id=\"cb92-22\"><a href=\"#cb92-22\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><\/span>\n<span id=\"cb92-23\"><a href=\"#cb92-23\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"dt\">void<\/span> modify_course<span class=\"op\">(<\/span><\/span>\n<span id=\"cb92-24\"><a href=\"#cb92-24\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    Course <span class=\"op\">*<\/span>courses<span class=\"op\">,<\/span><\/span>\n<span id=\"cb92-25\"><a href=\"#cb92-25\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"dt\">int<\/span> count<\/span>\n<span id=\"cb92-26\"><a href=\"#cb92-26\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"op\">);<\/span><\/span>\n<span id=\"cb92-27\"><a href=\"#cb92-27\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><\/span>\n<span id=\"cb92-28\"><a href=\"#cb92-28\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"dt\">void<\/span> print_courses<span class=\"op\">(<\/span><\/span>\n<span id=\"cb92-29\"><a href=\"#cb92-29\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    Course <span class=\"op\">*<\/span>courses<span class=\"op\">,<\/span><\/span>\n<span id=\"cb92-30\"><a href=\"#cb92-30\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"dt\">int<\/span> count<\/span>\n<span id=\"cb92-31\"><a href=\"#cb92-31\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"op\">);<\/span><\/span>\n<span id=\"cb92-32\"><a href=\"#cb92-32\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><\/span>\n<span id=\"cb92-33\"><a href=\"#cb92-33\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>Course <span class=\"op\">*<\/span>find_course<span class=\"op\">(<\/span><\/span>\n<span id=\"cb92-34\"><a href=\"#cb92-34\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    Course <span class=\"op\">*<\/span>courses<span class=\"op\">,<\/span><\/span>\n<span id=\"cb92-35\"><a href=\"#cb92-35\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"dt\">int<\/span> count<span class=\"op\">,<\/span><\/span>\n<span id=\"cb92-36\"><a href=\"#cb92-36\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"dt\">int<\/span> day<span class=\"op\">,<\/span><\/span>\n<span id=\"cb92-37\"><a href=\"#cb92-37\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"dt\">int<\/span> period<\/span>\n<span id=\"cb92-38\"><a href=\"#cb92-38\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"op\">);<\/span><\/span>\n<span id=\"cb92-39\"><a href=\"#cb92-39\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><\/span>\n<span id=\"cb92-40\"><a href=\"#cb92-40\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"pp\">#endif<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u91cc\u5df2\u7ecf\u7528\u5230\u4e86\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u4e8c\u7ea7\u6307\u9488<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u56e0\u4e3a\uff1a<\/p>\n\n\n\n<div class=\"sourceCode\" id=\"cb94\"><pre class=\"sourceCode c\"><code class=\"sourceCode c\"><span id=\"cb94-1\"><a href=\"#cb94-1\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>Course <span class=\"op\">**<\/span>courses<\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u53ef\u80fd\u9700\u8981\u4fee\u6539\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>courses<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u672c\u8eab\u6307\u5411\u7684\u5730\u5740\uff0c\u4f8b\u5982 <code>realloc()<\/code> \u540e\u6307\u9488\u53ef\u80fd\u53d1\u751f\u53d8\u5316\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u6b63\u597d\u662f\u4e4b\u524d\u6307\u9488\u5b66\u4e60\u6210\u679c\u7684\u6700\u7ec8\u5e94\u7528\u4e4b\u4e00\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u4e09\u5341\u56db\u3001\u6587\u4ef6\u6a21\u5757<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">\u53ef\u4ee5\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>file.h\n\u2193\nsave_courses()\nload_courses()\n\nfile.c\n\u2193\n\u771f\u6b63\u5b9e\u73b0\u6587\u4ef6\u64cd\u4f5c<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u6837\u4e3b\u7a0b\u5e8f\u5b8c\u5168\u4e0d\u7528\u5173\u5fc3\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>fopen\nfread\nfwrite\nfclose<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u4e09\u5341\u4e94\u3001\u914d\u7f6e\u6a21\u5757<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f8b\u5982\uff1a<\/p>\n\n\n\n<div class=\"sourceCode\" id=\"cb98\"><pre class=\"sourceCode c\"><code class=\"sourceCode c\"><span id=\"cb98-1\"><a href=\"#cb98-1\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"pp\">#ifndef CONFIG_H<\/span><\/span>\n<span id=\"cb98-2\"><a href=\"#cb98-2\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"pp\">#define CONFIG_H<\/span><\/span>\n<span id=\"cb98-3\"><a href=\"#cb98-3\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><\/span>\n<span id=\"cb98-4\"><a href=\"#cb98-4\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"pp\">#define DEFAULT_CAPACITY <\/span><span class=\"dv\">16<\/span><\/span>\n<span id=\"cb98-5\"><a href=\"#cb98-5\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"pp\">#define COURSE_NAME_SIZE <\/span><span class=\"dv\">100<\/span><\/span>\n<span id=\"cb98-6\"><a href=\"#cb98-6\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"pp\">#define TEACHER_NAME_SIZE <\/span><span class=\"dv\">100<\/span><\/span>\n<span id=\"cb98-7\"><a href=\"#cb98-7\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"pp\">#define ROOM_NAME_SIZE <\/span><span class=\"dv\">100<\/span><\/span>\n<span id=\"cb98-8\"><a href=\"#cb98-8\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><\/span>\n<span id=\"cb98-9\"><a href=\"#cb98-9\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"pp\">#endif<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u6837\u4fee\u6539\u914d\u7f6e\u7684\u65f6\u5019\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u53ea\u6539 config.h<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u4e09\u5341\u516d\u3001Makefile<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">\u6700\u7ec8\u9879\u76ee\u5c31\u53ef\u4ee5\u4f7f\u7528\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CC = gcc\nCFLAGS = -Wall -Wextra -g\n\nTARGET = course_manager\n\nOBJS = main.o course.o file.o\n\n$(TARGET): $(OBJS)\n    $(CC) $(CFLAGS) $^ -o $@\n\n%.o: %.c\n    $(CC) $(CFLAGS) -c $&lt; -o $@\n\n.PHONY: clean\n\nclean:\n    rm -f $(TARGET) $(OBJS)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u7f16\u8bd1\uff1a<\/p>\n\n\n\n<div class=\"sourceCode\" id=\"cb101\"><pre class=\"sourceCode bash\"><code class=\"sourceCode bash\"><span id=\"cb101-1\"><a href=\"#cb101-1\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"fu\">make<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u6e05\u7406\uff1a<\/p>\n\n\n\n<div class=\"sourceCode\" id=\"cb102\"><pre class=\"sourceCode bash\"><code class=\"sourceCode bash\"><span id=\"cb102-1\"><a href=\"#cb102-1\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"fu\">make<\/span> clean<\/span><\/code><\/pre><\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u4e09\u5341\u4e03\u3001\u8c03\u8bd5\u6700\u7ec8\u9879\u76ee<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">\u9879\u76ee\u8d8a\u5927\uff0c\u8d8a\u5bb9\u6613\u4ea7\u751f Bug\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5efa\u8bae\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u666e\u901a\u95ee\u9898\n\u2193\nprintf\n\n\u7f16\u8bd1\u95ee\u9898\n\u2193\n-Wall -Wextra\n\n\u5185\u5b58\u95ee\u9898\n\u2193\nAddressSanitizer\n\n\u5d29\u6e83\n\u2193\nGDB\n\nLinux \u5185\u5b58\u68c0\u67e5\n\u2193\nValgrind<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f8b\u5982\uff1a<\/p>\n\n\n\n<div class=\"sourceCode\" id=\"cb104\"><pre class=\"sourceCode bash\"><code class=\"sourceCode bash\"><span id=\"cb104-1\"><a href=\"#cb104-1\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a><span class=\"fu\">gcc<\/span> <span class=\"at\">-Wall<\/span> <span class=\"at\">-Wextra<\/span> <span class=\"at\">-g<\/span> <span class=\"dt\">\\<\/span><\/span>\n<span id=\"cb104-2\"><a href=\"#cb104-2\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"at\">-fsanitize<\/span><span class=\"op\">=<\/span>address,undefined <span class=\"dt\">\\<\/span><\/span>\n<span id=\"cb104-3\"><a href=\"#cb104-3\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    main.c course.c file.c <span class=\"dt\">\\<\/span><\/span>\n<span id=\"cb104-4\"><a href=\"#cb104-4\" aria-hidden=\"true\" tabindex=\"-1\" target=\"_blank\"  rel=\"nofollow\" ><\/a>    <span class=\"at\">-o<\/span> course_manager<\/span><\/code><\/pre><\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u4e09\u5341\u516b\u3001\u9879\u76ee\u5f00\u53d1\u6d41\u7a0b<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee5\u540e\u4e0d\u8981\u4e00\u4e0a\u6765\u5c31\u5199\u51e0\u5343\u884c\u4ee3\u7801\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u63a8\u8350\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u2460 \u786e\u5b9a\u9700\u6c42\n      \u2193\n\u2461 \u8bbe\u8ba1\u6570\u636e\u7ed3\u6784\n      \u2193\n\u2462 \u8bbe\u8ba1\u51fd\u6570\n      \u2193\n\u2463 \u5148\u5b9e\u73b0\u6700\u7b80\u5355\u529f\u80fd\n      \u2193\n\u2464 \u6d4b\u8bd5\n      \u2193\n\u2465 \u62c6\u6210 .h \/ .c\n      \u2193\n\u2466 \u52a0\u5165\u6587\u4ef6\u4fdd\u5b58\n      \u2193\n\u2467 \u52a0\u5165\u52a8\u6001\u5185\u5b58\n      \u2193\n\u2468 \u52a0\u5165\u9519\u8bef\u5904\u7406\n      \u2193\n\u2469 Makefile\n      \u2193\n\u246a \u8c03\u8bd5<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u4e09\u5341\u4e5d\u3001\u4e0d\u8981\u4e00\u6b21\u5199\u5b8c\u6574\u9879\u76ee<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f8b\u5982\u5b66\u751f\u7ba1\u7406\u7cfb\u7edf\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0d\u8981\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u4e00\u5929\u5199\u5b8c 2000 \u884c<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u63a8\u8350\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u7b2c\u4e00\u9636\u6bb5\n\u2193\n\u663e\u793a\u83dc\u5355\n\n\u7b2c\u4e8c\u9636\u6bb5\n\u2193\n\u6dfb\u52a0\u5b66\u751f\n\n\u7b2c\u4e09\u9636\u6bb5\n\u2193\n\u663e\u793a\u5b66\u751f\n\n\u7b2c\u56db\u9636\u6bb5\n\u2193\n\u67e5\u8be2\n\n\u7b2c\u4e94\u9636\u6bb5\n\u2193\n\u4fee\u6539 \/ \u5220\u9664\n\n\u7b2c\u516d\u9636\u6bb5\n\u2193\n\u6587\u4ef6\u4fdd\u5b58\n\n\u7b2c\u4e03\u9636\u6bb5\n\u2193\n\u52a8\u6001\u5185\u5b58\n\n\u7b2c\u516b\u9636\u6bb5\n\u2193\n\u62c6\u5206\u591a\u6587\u4ef6<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u6bcf\u4e00\u6b65\u90fd\u5148\u8fd0\u884c\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u56db\u5341\u3001\u6d4b\u8bd5<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e00\u4e2a\u7a0b\u5e8f\u4e0d\u662f\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u80fd\u8fd0\u884c<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u5c31\u7b97\u5b8c\u6210\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u9700\u8981\u6d4b\u8bd5\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u6b63\u5e38\u8f93\u5165\n\u2193\n\u8fb9\u754c\u8f93\u5165\n\u2193\n\u9519\u8bef\u8f93\u5165\n\u2193\n\u6781\u7aef\u8f93\u5165\n\u2193\n\u91cd\u590d\u64cd\u4f5c\n\u2193\n\u7a7a\u6570\u636e\n\u2193\n\u6587\u4ef6\u4e0d\u5b58\u5728\n\u2193\n\u6587\u4ef6\u635f\u574f<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f8b\u5982\u5b66\u751f\u7ba1\u7406\u7cfb\u7edf\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>0 \u4e2a\u5b66\u751f\n1 \u4e2a\u5b66\u751f\n100 \u4e2a\u5b66\u751f\n\u8d85\u8fc7\u5bb9\u91cf\n\u91cd\u590d ID\n\u4e0d\u5b58\u5728\u7684 ID\n\u7a7a\u6587\u4ef6\n\u4e0d\u5b58\u5728\u7684\u6587\u4ef6<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u56db\u5341\u4e00\u3001\u6700\u7ec8\u9879\u76ee\u5e94\u8be5\u5177\u5907\u4ec0\u4e48<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e00\u4e2a\u5408\u683c\u7684\u7efc\u5408\u9879\u76ee\u81f3\u5c11\u5e94\u8be5\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u2713 \u80fd\u6b63\u5e38\u8fd0\u884c\n\u2713 \u6709\u6e05\u6670\u7684\u6570\u636e\u7ed3\u6784\n\u2713 \u4f7f\u7528\u51fd\u6570\u62c6\u5206\u529f\u80fd\n\u2713 \u4f7f\u7528\u7ed3\u6784\u4f53\u7ec4\u7ec7\u6570\u636e\n\u2713 \u6b63\u786e\u4f7f\u7528\u6307\u9488\n\u2713 \u6b63\u786e\u7ba1\u7406\u52a8\u6001\u5185\u5b58\n\u2713 \u80fd\u4fdd\u5b58\u6570\u636e\n\u2713 \u80fd\u8bfb\u53d6\u6570\u636e\n\u2713 \u4f7f\u7528 .h \/ .c \u6a21\u5757\u5316\n\u2713 \u4f7f\u7528 Makefile \u6784\u5efa\n\u2713 \u80fd\u5904\u7406\u57fa\u672c\u9519\u8bef\n\u2713 \u80fd\u8c03\u8bd5<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u56db\u5341\u4e8c\u3001\u7efc\u5408\u9879\u76ee\u80fd\u529b\u5bf9\u5e94\u8868<\/h1>\n\n\n\n<pre class=\"wp-block-code\"><code>\u5b66\u4e60\u5185\u5bb9                    \u9879\u76ee\u4e2d\u7684\u5e94\u7528\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\u53d8\u91cf                        \u4fdd\u5b58\u72b6\u6001\nprintf \/ scanf              \u8f93\u5165\u8f93\u51fa\nif \/ switch                 \u83dc\u5355\u5224\u65ad\nfor \/ while                 \u904d\u5386\u548c\u83dc\u5355\u5faa\u73af\n\u51fd\u6570                        \u529f\u80fd\u62c6\u5206\n\u6570\u7ec4                        \u4fdd\u5b58\u591a\u4e2a\u5bf9\u8c61\n\u5b57\u7b26\u4e32                      \u59d3\u540d\u3001\u8bfe\u7a0b\u540d\u7b49\n\u6307\u9488                        \u4fee\u6539\u6570\u636e\u3001\u4f20\u9012\u5730\u5740\n\u4e8c\u7ea7\u6307\u9488                    realloc \u7b49\u573a\u666f\n\u7ed3\u6784\u4f53                      Student \/ Course\nmalloc                      \u52a8\u6001\u6570\u636e\nrealloc                     \u6269\u5bb9\nfree                        \u91ca\u653e\u5185\u5b58\n\u6587\u4ef6\u64cd\u4f5c                    \u6570\u636e\u6301\u4e45\u5316\n#define                     \u914d\u7f6e\n.h \/ .c                     \u6a21\u5757\u5316\nextern \/ static             \u6a21\u5757\u7ba1\u7406\nMakefile                    \u81ea\u52a8\u6784\u5efa\nGDB                         \u8c03\u8bd5\nSanitizer                   \u5185\u5b58\u9519\u8bef\u68c0\u67e5<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u56db\u5341\u4e09\u3001\u672c\u7ae0\u63a8\u8350\u7684\u4e09\u4e2a\u9879\u76ee\u96be\u5ea6<\/h1>\n\n\n\n<pre class=\"wp-block-code\"><code>Level 1\n\u2514\u2500 \u731c\u6570\u5b57\n\nLevel 2\n\u2514\u2500 \u5b66\u751f\u7ba1\u7406\u7cfb\u7edf\n   \u251c\u2500 \u6dfb\u52a0\n   \u251c\u2500 \u5220\u9664\n   \u251c\u2500 \u4fee\u6539\n   \u251c\u2500 \u67e5\u8be2\n   \u251c\u2500 \u6587\u4ef6\u4fdd\u5b58\n   \u2514\u2500 \u6587\u4ef6\u8bfb\u53d6\n\nLevel 3\n\u2514\u2500 \u8bfe\u7a0b\u8868\u7ba1\u7406\u7cfb\u7edf\n   \u251c\u2500 \u7ed3\u6784\u4f53\n   \u251c\u2500 \u52a8\u6001\u5185\u5b58\n   \u251c\u2500 \u65f6\u95f4\u51b2\u7a81\n   \u251c\u2500 \u6587\u4ef6\u6301\u4e45\u5316\n   \u251c\u2500 \u591a\u6587\u4ef6\n   \u251c\u2500 Makefile\n   \u2514\u2500 \u8c03\u8bd5<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u56db\u5341\u56db\u3001\u6700\u7ec8\u7ec3\u4e60\uff1a\u4ece\u96f6\u5b8c\u6210\u8bfe\u7a0b\u8868\u7cfb\u7edf<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0d\u8981\u76f4\u63a5\u590d\u5236\u73b0\u6210\u4ee3\u7801\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u81ea\u5df1\u5b8c\u6210\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Step 1\n\u8bbe\u8ba1 Course \u7ed3\u6784\u4f53\n\nStep 2\n\u8bbe\u8ba1\u83dc\u5355\n\nStep 3\n\u6dfb\u52a0\u8bfe\u7a0b\n\nStep 4\n\u663e\u793a\u8bfe\u7a0b\n\nStep 5\n\u67e5\u8be2\u8bfe\u7a0b\n\nStep 6\n\u4fee\u6539\u8bfe\u7a0b\n\nStep 7\n\u5220\u9664\u8bfe\u7a0b\n\nStep 8\n\u68c0\u67e5\u65f6\u95f4\u51b2\u7a81\n\nStep 9\n\u4fdd\u5b58\u6587\u4ef6\n\nStep 10\n\u8bfb\u53d6\u6587\u4ef6\n\nStep 11\n\u4f7f\u7528 malloc\n\nStep 12\n\u4f7f\u7528 realloc\n\nStep 13\n\u4f7f\u7528 free\n\nStep 14\n\u62c6\u6210 .h \/ .c\n\nStep 15\n\u5199 Makefile\n\nStep 16\n\u4f7f\u7528 Sanitizer \/ GDB \u8c03\u8bd5<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u6700\u7ec8\u8fbe\u5230\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u8fd0\u884c\u7a0b\u5e8f\n\u2193\n\u64cd\u4f5c\u8bfe\u7a0b\u8868\n\u2193\n\u5173\u95ed\u7a0b\u5e8f\n\u2193\n\u91cd\u65b0\u6253\u5f00\n\u2193\n\u8bfe\u7a0b\u4ecd\u7136\u5b58\u5728<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u624d\u771f\u6b63\u5b8c\u6210\u4e86\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u4e00\u4e2a\u5b8c\u6574\u7684 C \u8bed\u8a00\u9879\u76ee\u3002<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u56db\u5341\u4e94\u3001\u5b8c\u6574\u8bfe\u7a0b\u7ed3\u675f<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">\u81f3\u6b64\uff0c\u8fd9\u5957 C \u8bed\u8a00\u57fa\u7840\u8bfe\u7a0b\u7ed3\u675f\u4e86<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u9762\u6211\u4eec\u5df2\u7ecf\u5b66\u4e60\u4e86\uff1a \u5230\u8fd9\u91cc\uff0c\u771f\u6b63\u7f3a\u5c11\u7684\u4e0d\u662f\u65b0\u7684\u8bed\u6cd5\uff0c\u800c\u662f\uff1a \u628a\u8fd9\u4e9b\u77e5\u8bc6\u7ec4\u5408\u8d77\u6765\u3002 \u6240\u4ee5\u8fd9\u4e00\u7ae0\u4e0d\u518d\u4ee5\u201c\u5b66\u4e60\u4e00\u4e2a\u65b0\u8bed\u6cd5\u201d\u4e3a\u4e3b\uff0c\u800c\u662f\u901a &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-110","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/decagrammaton.xyz\/index.php?rest_route=\/wp\/v2\/posts\/110","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/decagrammaton.xyz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/decagrammaton.xyz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/decagrammaton.xyz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/decagrammaton.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=110"}],"version-history":[{"count":1,"href":"https:\/\/decagrammaton.xyz\/index.php?rest_route=\/wp\/v2\/posts\/110\/revisions"}],"predecessor-version":[{"id":111,"href":"https:\/\/decagrammaton.xyz\/index.php?rest_route=\/wp\/v2\/posts\/110\/revisions\/111"}],"wp:attachment":[{"href":"https:\/\/decagrammaton.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=110"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/decagrammaton.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=110"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/decagrammaton.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=110"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}