{"id":52901,"date":"2025-08-11T21:19:22","date_gmt":"2025-08-11T13:19:22","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/52901.html"},"modified":"2025-08-11T21:19:22","modified_gmt":"2025-08-11T13:19:22","slug":"linux%e5%ad%a6%e4%b9%a0-%e5%ba%94%e7%94%a8%e8%bd%af%e4%bb%b6%e7%bc%96%e7%a8%8b%ef%bc%88fread-fwrite%ef%bc%8c%e6%b5%81%e5%ae%9a%e4%b9%89%e7%9b%b8%e5%85%b3%e6%8e%a5%e5%8f%a3%ef%bc%89","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/52901.html","title":{"rendered":"Linux\u5b66\u4e60-\u5e94\u7528\u8f6f\u4ef6\u7f16\u7a0b\uff08fread\/fwrite\uff0c\u6d41\u5b9a\u4e49\u76f8\u5173\u63a5\u53e3\uff09"},"content":{"rendered":"<h4>fread<\/h4>\n<p>size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream); \u00a0<\/p>\n<h6>\u529f\u80fd<\/h6>\n<p>\u6309\u5757\u4ece\u6587\u4ef6\u8bfb\u53d6\u6570\u636e&#xff0c;\u4ece\u6587\u4ef6\u4e2d\u8bfb nmemb \u00a0\u4e2a\u3001\u6bcf\u4e2a size \u00a0\u5b57\u8282\u7684\u5143\u7d20&#xff0c;\u5b58\u5165 ptr \u00a0\u6307\u5411\u7684\u5185\u5b58\u3002<\/p>\n<h6>\u53c2\u6570<\/h6>\n<p>&#8211;\u00a0 ptr\u00a0&#xff1a;\u5b58\u50a8\u8bfb\u53d6\u6570\u636e\u7684\u5185\u5b58\u9996\u5730\u5740&#xff08;\u9700\u63d0\u524d\u5206\u914d\u8db3\u591f\u7a7a\u95f4&#xff0c;\u5982\u5b9a\u4e49\u6570\u7ec4\u3001\u7528 \u00a0malloc\u00a0\u00a0\u7533\u8bf7\u5806\u5185\u5b58 &#xff09;\u3002<br \/>\n&#8211; \u00a0size\u00a0&#xff1a;\u5355\u4e2a\u5143\u7d20\u7684\u5b57\u8282\u6570&#xff08;\u540c \u00a0fwrite\u00a0&#xff0c;\u9700\u548c\u5199\u5165\u65f6\u7684 \u00a0size\u00a0\u00a0\u4e00\u81f4&#xff0c;\u5426\u5219\u6570\u636e\u4f1a\u9519\u4f4d &#xff09;\u3002<br \/>\n&#8211; \u00a0nmemb\u00a0&#xff1a;\u5e0c\u671b\u8bfb\u53d6\u7684\u5143\u7d20\u4e2a\u6570&#xff08;\u5c1d\u8bd5\u8bfb \u00a0size * nmemb\u00a0\u00a0\u5b57\u8282&#xff0c;\u5b9e\u9645\u8bfb\u591a\u5c11\u770b\u6587\u4ef6\u5185\u5bb9 &#xff09;\u3002<br \/>\n&#8211; \u00a0stream\u00a0&#xff1a;\u6587\u4ef6\u6d41\u6307\u9488&#xff08;\u901a\u8fc7 \u00a0fopen\u00a0\u00a0\u6253\u5f00&#xff0c;\u9700\u4ee5\u53ef\u8bfb\u6a21\u5f0f\u5982 \u00a0\u00a0&#034;r&#043;&#034;\u00a0\u00a0\u7b49\u6253\u5f00 &#xff09;\u3002<\/p>\n<h6>\u8fd4\u56de\u503c<\/h6>\n<p>&#8211; \u6210\u529f&#xff1a;\u8fd4\u56de\u5b9e\u9645\u8bfb\u5230\u7684\u5143\u7d20\u4e2a\u6570&#xff08;\u7b49\u4e8e \u00a0nmemb\u00a0\u00a0\u8868\u793a\u8bfb\u6ee1&#xff1b;\u82e5\u6587\u4ef6\u672b\u5c3e\u4e0d\u591f \u00a0nmemb\u00a0\u00a0\u4e2a\u5143\u7d20&#xff0c;\u8fd4\u56de\u5b9e\u9645\u8bfb\u5230\u7684\u6570\u91cf &#xff09;\u3002<br \/>\n&#8211; \u6587\u4ef6\u672b\u5c3e&#xff1a;\u8fd4\u56de \u00a00\u00a0&#xff08;\u53ef\u7528\u6765\u5224\u65ad\u662f\u5426\u8bfb\u5b8c\u6587\u4ef6 &#xff09;\u3002<\/p>\n<p>#include&lt;stdio.h&gt;<br \/>\nstruct stu<br \/>\n{<br \/>\n    int id;<br \/>\n    char name[100];<br \/>\n    int score;<br \/>\n};<br \/>\nint main(int argc,const char*argv[])<br \/>\n{<br \/>\n    FILE*fp &#061; fopen(&#034;.\/1.txt&#034;,&#034;r&#034;);<br \/>\n    if(NULL &#061;&#061; fp)<br \/>\n    {<br \/>\n        printf(&#034;fopen error\\\\n&#034;);<br \/>\n        return -1;<br \/>\n    }<br \/>\n    struct stu s;<br \/>\n    struct stu ss[10];<br \/>\n    size_t cnt &#061; fread(&amp;s,sizeof(struct stu),1,fp);<\/p>\n<p>    printf(&#034;cnt &#061; %ld\\\\n&#034;,cnt);<br \/>\n    printf(&#034;%d %s %d\\\\n&#034;,s.id,s.name,s.score);<\/p>\n<p>    cnt &#061; fread(ss,sizeof(struct stu),10,fp);<br \/>\n    printf(&#034;cnt &#061; %ld\\\\n&#034;,cnt);<\/p>\n<p>    for(int i &#061; 0;i &lt; cnt;i&#043;&#043;)<br \/>\n    {<br \/>\n        printf(&#034;%d %s %d\\\\n&#034;,ss[i].id,ss[i].name,ss[i].score);<br \/>\n    }<br \/>\n    fclose(fp);<br \/>\n}<\/p>\n<h4>fwrite<\/h4>\n<p>size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream); \u00a0<\/p>\n<h6>\u529f\u80fd<\/h6>\n<p>\u6309\u5757\u5411\u6587\u4ef6\u5199\u5165\u6570\u636e&#xff0c;\u628a ptr \u00a0\u6307\u5411\u7684\u5185\u5b58\u6570\u636e&#xff0c;\u4ee5\u300c size \u00a0\u5b57\u8282\/\u5143\u7d20 \u3001\u5171 nmemb \u00a0\u4e2a\u5143\u7d20\u300d\u7684\u5f62\u5f0f\u5199\u5165\u6587\u4ef6\u3002<\/p>\n<h6>\u53c2\u6570<\/h6>\n<p>&#8211; \u00a0ptr\u00a0&#xff1a;\u8981\u5199\u5165\u6570\u636e\u7684\u5185\u5b58\u9996\u5730\u5740&#xff08;\u5e38\u642d\u914d\u6570\u7ec4\u3001\u7ed3\u6784\u4f53\u7b49&#xff0c;\u4f20\u9012 \u00a0&amp;\u53d8\u91cf\u00a0\u00a0\u6216\u6570\u7ec4\u540d&#xff09;\u3002<br \/>\n&#8211; \u00a0size\u00a0&#xff1a;\u5355\u4e2a\u5143\u7d20\u7684\u5b57\u8282\u6570&#xff08;\u5982 \u00a0sizeof(int)\u00a0\u00a0\u8868\u793a int \u7c7b\u578b\u5360 4 \u5b57\u8282&#xff09;\u3002<br \/>\n&#8211; \u00a0nmemb\u00a0&#xff1a;\u8981\u5199\u5165\u7684\u5143\u7d20\u4e2a\u6570&#xff08;\u9700\u548c \u00a0size\u00a0\u00a0\u5339\u914d&#xff0c;\u603b\u5199\u5165\u5b57\u8282 &#061; \u00a0size * nmemb\u00a0\u00a0&#xff09;\u3002<br \/>\n&#8211; \u00a0stream\u00a0&#xff1a;\u6587\u4ef6\u6d41\u6307\u9488&#xff08;\u901a\u8fc7 \u00a0fopen\u00a0\u00a0\u6253\u5f00\u6587\u4ef6\u83b7\u5f97&#xff0c;\u9700\u786e\u4fdd\u4ee5\u53ef\u5199\u6a21\u5f0f\u5982 \u00a0&#034;wb&#034;\u00a0\u00a0\u3001\u00a0&#034;a&#043;&#034;\u00a0\u00a0\u7b49\u6253\u5f00 &#xff09;\u3002<\/p>\n<h6>\u8fd4\u56de\u503c<\/h6>\n<p>&#8211; \u6210\u529f&#xff1a;\u8fd4\u56de\u5b9e\u9645\u5199\u5165\u7684\u5143\u7d20\u4e2a\u6570&#xff08;\u6b63\u5e38\u5e94\u7b49\u4e8e \u00a0nmemb\u00a0&#xff1b;\u82e5\u78c1\u76d8\u6ee1\u3001\u6743\u9650\u4e0d\u8db3\u7b49&#xff0c;\u53ef\u80fd\u5c0f\u4e8e&#xff09;\u3002<\/p>\n<p>#include&lt;stdio.h&gt;<\/p>\n<p>struct stu<br \/>\n{<br \/>\n    int id;<br \/>\n    char name[100];<br \/>\n    int score;<br \/>\n};<br \/>\nint main(int argc,const char*argv[])<br \/>\n{<br \/>\n    FILE*fp &#061; fopen(&#034;.\/1.txt&#034;,&#034;w&#034;);<br \/>\n    if(NULL &#061;&#061; fp)<br \/>\n    {<br \/>\n        printf(&#034;fopen error\\\\n&#034;);<br \/>\n        return -1;<br \/>\n    }<br \/>\n    struct stu ss[5] &#061; {{1,&#034;zahngsan&#034;,99},{2,&#034;lisi&#034;,90},{3,&#034;wangwu&#034;,98},{4,&#034;maliu&#034;,67},{5,&#034;wanger&#034;,100}};<br \/>\n    size_t cnt &#061; fwrite(ss,sizeof(struct stu),5,fp);<br \/>\n    printf(&#034;cnt &#061; %ld\\\\n&#034;,cnt);<br \/>\n    fclose(fp);<br \/>\n}<\/p>\n<h4>bmp<\/h4>\n<h4><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"407\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250811131920-6899edd8c7251.png\" width=\"631\" \/><\/h4>\n<p>#pragma pack(1)<\/p>\n<p>\/\/bmp\u6587\u4ef6\u76f8\u5173\u4fe1\u606f<br \/>\ntypedef struct tagBITMAPFILEHEADER {<br \/>\n    short    bfType;         \/\/ \u6587\u4ef6\u7c7b\u578b\u6807\u5fd7<br \/>\n    int      bfSize;         \/\/ \u6587\u4ef6\u5927\u5c0f&#xff0c;\u5355\u4f4d\u4e3a\u5b57\u8282<br \/>\n    short    bfReserved1;    \/\/ \u4fdd\u7559\u5b57\u8282<br \/>\n    short    bfReserved2;    \/\/ \u4fdd\u7559\u5b57\u8282<br \/>\n    int      bfOffBits;      \/\/ \u6570\u636e\u504f\u79fb\u91cf&#xff0c;\u5373\u5b9e\u9645\u56fe\u50cf\u6570\u636e\u5f00\u59cb\u7684\u4f4d\u7f6e<br \/>\n}Bmp_file_head_t;<br \/>\n\/\/bmp\u56fe\u50cf\u4fe1\u606f<br \/>\ntypedef struct tagBITMAPINFOHEADER {<br \/>\n    int   biSize;         \/\/ BITMAPINFOHEADER\u7684\u5927\u5c0f&#xff0c;\u5355\u4f4d\u4e3a\u5b57\u8282<br \/>\n    int    biWidth;        \/\/ \u4f4d\u56fe\u7684\u5bbd\u5ea6&#xff0c;\u5355\u4f4d\u4e3a\u50cf\u7d20<br \/>\n    int    biHeight;       \/\/ \u4f4d\u56fe\u7684\u9ad8\u5ea6&#xff0c;\u5355\u4f4d\u4e3a\u50cf\u7d20<br \/>\n    short    biPlanes;       \/\/ \u76ee\u6807\u8bbe\u5907\u7684\u4f4d\u5e73\u9762\u6570&#xff0c;\u5fc5\u987b\u4e3a1<br \/>\n    short    biBitCount;     \/\/ \u6bcf\u50cf\u7d20\u4f4d\u6570&#xff08;\u989c\u8272\u6df1\u5ea6&#xff09;<br \/>\n    int   biCompression;  \/\/ \u56fe\u50cf\u538b\u7f29\u7c7b\u578b<br \/>\n    int   biSizeImage;    \/\/ \u56fe\u50cf\u5927\u5c0f&#xff0c;\u5355\u4f4d\u4e3a\u5b57\u8282<br \/>\n    int    biXPelsPerMeter;\/\/ \u6c34\u5e73\u5206\u8fa8\u7387&#xff0c;\u5355\u4f4d\u4e3a\u50cf\u7d20\/\u7c73<br \/>\n    int    biYPelsPerMeter;\/\/ \u5782\u76f4\u5206\u8fa8\u7387&#xff0c;\u5355\u4f4d\u4e3a\u50cf\u7d20\/\u7c73<br \/>\n    int   biClrUsed;      \/\/ \u5b9e\u9645\u4f7f\u7528\u989c\u8272\u6570<br \/>\n    int   biClrImportant; \/\/ \u91cd\u8981\u989c\u8272\u6570<br \/>\n}Bmp_info_t;<br \/>\n#pragma pack()<\/p>\n<p>int get_bmp_head_info(const char *bmpname, Bmp_file_head_t *pheadinfo, Bmp_info_t *pbmpinfo)<br \/>\n{<br \/>\nFILE *fp &#061; fopen(bmpname, &#034;r&#034;);<br \/>\nif (NULL &#061;&#061; fp)<br \/>\n{<br \/>\nprintf(&#034;fopen error\\\\n&#034;);<br \/>\nreturn -1;<br \/>\n}<\/p>\n<p>fread(pheadinfo, sizeof(Bmp_file_head_t), 1, fp);<br \/>\nfread(pbmpinfo, sizeof(Bmp_info_t), 1, fp);<\/p>\n<p>fclose(fp);<\/p>\n<p>return 0;<br \/>\n}<\/p>\n<p>int main(int argc, const char *argv[])<br \/>\n{<\/p>\n<p>Bmp_file_head_t headinfo;<br \/>\nBmp_info_t bmpinfo;<\/p>\n<p>get_bmp_head_info(&#034;.\/3.bmp&#034;, &amp;headinfo, &amp;bmpinfo);<\/p>\n<p>printf(&#034;sizeof(Bmp_file_head_t) &#061; %ld\\\\n&#034;, sizeof(Bmp_file_head_t));<br \/>\nprintf(&#034;sizeof(Bmp_info_t) &#061; %ld\\\\n&#034;, sizeof(Bmp_info_t));<br \/>\nprintf(&#034;biWidth &#061; %d, biHeight &#061; %d, biBitCount &#061; %d\\\\n&#034;, bmpinfo.biWidth, bmpinfo.biHeight, bmpinfo.biBitCount);<\/p>\n<p>return 0;<br \/>\n}<\/p>\n<h2>\u00a0\u6d41\u5b9a\u4f4d\u76f8\u5173\u63a5\u53e3<\/h2>\n<h4>fseek<\/h4>\n<p>int fseek(FILE *stream, long offset, int whence);<\/p>\n<h6>\u529f\u80fd<\/h6>\n<p>\u5b9e\u73b0\u6587\u4ef6\u6d41\u7684\u91cd\u65b0\u5b9a\u4f4d&#xff0c;\u7528\u4e8e\u8c03\u6574\u6587\u4ef6\u5185\u90e8\u6307\u9488\u7684\u4f4d\u7f6e&#xff0c;\u51b3\u5b9a\u540e\u7eed\u8bfb\u5199\u64cd\u4f5c\u4ece\u6587\u4ef6\u7684\u54ea\u4e2a\u4f4d\u7f6e\u5f00\u59cb\u3002<\/p>\n<h6>\u53c2\u6570<\/h6>\n<p>&#8211; \u00a0stream\u00a0&#xff1a;\u9700\u8981\u8fdb\u884c\u5b9a\u4f4d\u64cd\u4f5c\u7684\u6587\u4ef6\u6d41\u6307\u9488&#xff0c;\u7531 \u00a0fopen\u00a0\u00a0\u7b49\u51fd\u6570\u6253\u5f00\u6587\u4ef6\u540e\u83b7\u5f97\u3002<br \/>\n&#8211; \u00a0offset\u00a0&#xff1a;\u504f\u79fb\u91cf&#xff0c;\u7528\u4e8e\u6307\u5b9a\u76f8\u5bf9\u4e8e \u00a0whence\u00a0\u00a0\u4f4d\u7f6e\u79fb\u52a8\u7684\u5b57\u8282\u6570&#xff0c;\u53ef\u6b63&#xff08;\u5411\u540e\u79fb\u52a8 \u00a0&#xff09;\u3001\u53ef\u8d1f&#xff08;\u5411\u524d\u79fb\u52a8 \u00a0&#xff0c;\u4f46\u9700\u6ce8\u610f\u4e0d\u80fd\u8d8a\u754c &#xff09;\u3002<br \/>\n&#8211; \u00a0whence\u00a0&#xff1a;\u5b9a\u4f4d\u7684\u76f8\u5bf9\u57fa\u51c6\u4f4d\u7f6e&#xff0c;\u6709\u4ee5\u4e0b\u5b8f\u5b9a\u4e49\u53ef\u9009&#xff1a;<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#8211; \u00a0SEEK_SET\u00a0&#xff1a;\u4ee5\u6587\u4ef6\u5f00\u5934\u4e3a\u57fa\u51c6\u8fdb\u884c\u504f\u79fb&#xff0c;\u00a0offset\u00a0\u00a0\u4e3a\u76f8\u5bf9\u4e8e\u6587\u4ef6\u5f00\u5934\u7684\u504f\u79fb\u5b57\u8282\u6570\u3002<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#8211; \u00a0SEEK_CUR\u00a0&#xff1a;\u4ee5\u6587\u4ef6\u5f53\u524d\u8bfb\u5199\u4f4d\u7f6e\u4e3a\u57fa\u51c6\u8fdb\u884c\u504f\u79fb&#xff0c;\u00a0offset\u00a0\u00a0\u662f\u76f8\u5bf9\u4e8e\u5f53\u524d\u4f4d\u7f6e\u7684\u504f\u79fb\u91cf\u3002<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#8211; \u00a0SEEK_END\u00a0&#xff1a;\u4ee5\u6587\u4ef6\u672b\u5c3e\u4e3a\u57fa\u51c6\u8fdb\u884c\u504f\u79fb&#xff0c;\u00a0offset\u00a0\u00a0\u5e38\u642d\u914d\u8d1f\u6570&#xff0c;\u5b9e\u73b0\u4ece\u672b\u5c3e\u5f80\u524d\u5b9a\u4f4d&#xff08;\u5982 \u00a0fseek(stream, -10, SEEK_END)\u00a0\u00a0\u8868\u793a\u5b9a\u4f4d\u5230\u6587\u4ef6\u672b\u5c3e\u5411\u524d 10 \u5b57\u8282\u5904 &#xff09;\u3002<\/p>\n<h6>\u8fd4\u56de\u503c<\/h6>\n<p>&#8211; \u6210\u529f&#xff1a;\u8fd4\u56de \u5f53\u524d\u504f\u79fb\u91cf\u3002<br \/>\n&#8211; \u5931\u8d25&#xff1a;\u8fd4\u56de -1 &#xff0c;\u5e38\u89c1\u5931\u8d25\u60c5\u51b5\u5982\u504f\u79fb\u91cf\u5bfc\u81f4\u8d8a\u754c&#xff08;\u5982 \u00a0SEEK_SET\u00a0\u00a0\u65f6 \u00a0offset\u00a0\u00a0\u4e3a\u8d1f\u6570 &#xff09;\u3001\u6587\u4ef6\u6d41\u5f02\u5e38\u7b49\u3002<\/p>\n<p>rewind&#xff08;fp&#xff09; &#061;&#061;&gt;fseek&#xff08;fp&#xff0c;0&#xff0c;SEEK_SET&#xff09;<\/p>\n<h4>ftell<\/h4>\n<p>long ftell(FILE *stream);<\/p>\n<h6>\u529f\u80fd<\/h6>\n<p>\u83b7\u53d6\u6587\u4ef6\u6d41\u5f53\u524d\u4f4d\u7f6e\u5230\u6587\u4ef6\u5f00\u5934\u7684\u504f\u79fb\u91cf&#xff0c;\u5373\u8fd4\u56de\u5f53\u524d\u6587\u4ef6\u6307\u9488\u8ddd\u79bb\u6587\u4ef6\u8d77\u59cb\u4f4d\u7f6e\u7684\u5b57\u8282\u6570&#xff0c;\u53ef\u7528\u4e8e\u5224\u65ad\u6587\u4ef6\u5927\u5c0f\u3001\u8f85\u52a9 fseek \u00a0\u5b9a\u4f4d\u7b49\u573a\u666f\u3002<\/p>\n<h6>\u8fd4\u56de\u503c<\/h6>\n<p>\u504f\u79fb\u91cf&#xff1a;byte<\/p>\n<h4>\u7ec3\u4e60<\/h4>\n<p>#include&lt;stdio.h&gt;<br \/>\n#include&lt;stdlib.h&gt;<br \/>\nstruct stu<br \/>\n{<br \/>\n    int id;<br \/>\n    char name[100];<br \/>\n    int score;<br \/>\n};<br \/>\nint main(int argc,const char*argv[])<br \/>\n{<br \/>\n    FILE*fp &#061; fopen(&#034;.\/1.txt&#034;,&#034;w&#043;&#034;);<br \/>\n    if(NULL &#061;&#061; fp)<br \/>\n    {<br \/>\n        printf(&#034;fopen error\\\\n&#034;);<br \/>\n        return -1;<br \/>\n    }<br \/>\n    struct stu ss[5] &#061; {{1,&#034;zahngsan&#034;,99},{2,&#034;lisi&#034;,90},{3,&#034;wangwu&#034;,98},{4,&#034;maliu&#034;,67},{5,&#034;wanger&#034;,100}};<br \/>\n    fwrite(ss,sizeof(struct stu),5,fp);<\/p>\n<p>    fseek(fp,0,SEEK_END);<br \/>\n    long len &#061; ftell(fp);<br \/>\n    rewind(fp);<\/p>\n<p>    FILE*fp1 &#061; fopen(&#034;.\/2.txt&#034;,&#034;w&#034;);<br \/>\n    if(NULL &#061;&#061; fp1)<br \/>\n    {<br \/>\n        printf(&#034;fopen error\\\\n&#034;);<br \/>\n        return -1;<br \/>\n    }<br \/>\n    \/\/\u7a7a\u6d1e\u6587\u4ef6<br \/>\n    fseek(fp1,len &#8211; 1,SEEK_SET);<br \/>\n    int ret &#061; fputc(&#039;\\\\0&#039;,fp1);<br \/>\n    if(EOF &#061;&#061; ret)<br \/>\n    {<br \/>\n        printf(&#034;\u78c1\u76d8\u7a7a\u95f4\u4e0d\u8db3\\\\n&#034;);<br \/>\n        return -1;<br \/>\n    }<\/p>\n<p>    fseek(fp1,0,SEEK_SET);<br \/>\n    char *buff &#061; malloc(len);<\/p>\n<p>    fread(buff,1,len,fp);<br \/>\n    fwrite(buff,1,len,fp1);<\/p>\n<p>    free(buff);<br \/>\n    fclose(fp);<br \/>\n    fclose(fp1);<br \/>\n}<\/p>\n<h4>strtok<\/h4>\n<p>char *strtok(char *str, const char *delim); \u00a0<\/p>\n<h6>\u529f\u80fd<\/h6>\n<p>\u6309\u5206\u9694\u7b26\u622a\u53d6\u5b57\u7b26\u4e32&#xff0c;\u4ece \u00a0str\u00a0\u00a0\u4e2d\u9010\u4e2a\u63d0\u53d6\u7531 \u00a0delim\u00a0\u00a0\u5206\u9694\u7684\u5b50\u4e32\u3002\u9996\u6b21\u8c03\u7528\u9700\u4f20\u5165\u5f85\u5206\u5272\u7684\u5b8c\u6574\u5b57\u7b26\u4e32 \u00a0str\u00a0&#xff0c;\u540e\u7eed\u8c03\u7528\u4f20\u5165 \u00a0NULL\u00a0\u00a0\u5373\u53ef\u7ee7\u7eed\u5206\u5272\u5269\u4f59\u90e8\u5206&#xff08;\u5185\u90e8\u4f1a\u7ef4\u62a4\u9759\u6001\u6307\u9488\u8bb0\u5f55\u4f4d\u7f6e &#xff09;\u3002<\/p>\n<h6>\u53c2\u6570<\/h6>\n<p>&#8211; \u00a0str\u00a0&#xff1a;<br \/>\n&#8211; \u9996\u6b21\u8c03\u7528&#xff1a;\u4f20\u5165\u5f85\u5206\u5272\u7684\u539f\u59cb\u5b57\u7b26\u4e32&#xff08;\u4f1a\u88ab\u51fd\u6570\u4fee\u6539&#xff0c;\u5206\u5272\u540e\u539f\u5b57\u7b26\u4e32\u4f1a\u88ab\u5206\u9694\u7b26\u66ff\u6362\u4e3a \u00a0\\\\0\u00a0\u00a0&#xff0c;\u7528\u4e8e\u6807\u8bb0\u5b50\u4e32\u7ed3\u675f &#xff09;\u3002<br \/>\n&#8211; \u540e\u7eed\u8c03\u7528&#xff1a;\u4f20\u5165 \u00a0NULL\u00a0\u00a0&#xff0c;\u51fd\u6570\u4f1a\u57fa\u4e8e\u5185\u90e8\u9759\u6001\u6307\u9488&#xff0c;\u7ee7\u7eed\u5206\u5272\u5269\u4f59\u672a\u5904\u7406\u7684\u90e8\u5206\u3002<br \/>\n&#8211; \u00a0delim\u00a0&#xff1a;<br \/>\n\u4f20\u5165\u5206\u9694\u7b26\u5b57\u7b26\u4e32&#xff08;\u5982 \u00a0&#034;,-&#034;\u00a0\u00a0\u8868\u793a\u9017\u53f7\u3001\u51cf\u53f7\u90fd\u53ef\u4f5c\u4e3a\u5206\u9694\u7b26 &#xff09;&#xff0c;\u53ea\u8981\u9047\u5230 \u00a0delim\u00a0\u00a0\u4e2d\u4efb\u610f\u5b57\u7b26&#xff0c;\u5c31\u4f1a\u505c\u6b62\u5f53\u524d\u5b50\u4e32\u622a\u53d6\u3002<\/p>\n<h6>\u8fd4\u56de\u503c<\/h6>\n<p>&#8211; \u6210\u529f&#xff1a;\u8fd4\u56de\u5f53\u524d\u622a\u53d6\u5230\u7684\u5b50\u4e32\u9996\u5730\u5740&#xff08;\u5982\u5206\u5272 \u00a0&#034;a,b,c&#034;\u00a0\u00a0&#xff0c;\u9996\u6b21\u8fd4\u56de \u00a0&#034;a&#034;\u00a0\u00a0\u7684\u5730\u5740&#xff0c;\u540e\u7eed\u4f9d\u6b21\u8fd4\u56de \u00a0&#034;b&#034;\u00a0\u3001\u00a0&#034;c&#034;\u00a0\u00a0&#xff09;\u3002<br \/>\n&#8211; \u5931\u8d25\/\u7ed3\u675f&#xff1a;\u8fd4\u56de \u00a0NULL\u00a0&#xff08;\u5f53\u6ca1\u6709\u53ef\u5206\u5272\u7684\u5b50\u4e32\u65f6\u89e6\u53d1 &#xff09;\u3002<\/p>\n<h4>\u7ec3\u4e60<\/h4>\n<p>\u5b9e\u73b0\u4e00\u4e2a\u5355\u8bcd\u67e5\u8be2\u8f6f\u4ef6&#xff1a; \u7528\u6237\u4ece\u7ec8\u7aef\u8f93\u5165\u4e00\u4e2a\u5355\u8bcd&#xff0c;\u67e5\u627e\u8be5\u5355\u8bcd\u7684\u610f\u601d\u5e76\u6253\u5370&#xff1b; \u82e5\u7528\u6237\u8f93\u5165&#034;.quit&#034;,\u5219\u9000\u51fa\u8be5\u8f6f\u4ef6\u3002<\/p>\n<p>#include&lt;stdio.h&gt;<br \/>\n#include &lt;string.h&gt;<br \/>\nint main(int argc,const char*argv[])<br \/>\n{<br \/>\n    FILE*fp &#061; fopen(&#034;.\/dict.txt&#034;,&#034;r&#034;);<br \/>\n    if(NULL &#061;&#061; fp)<br \/>\n    {<br \/>\n        printf(&#034;fopen error\\\\n&#034;);<br \/>\n        return -1;<br \/>\n    }<br \/>\n    rewind(fp);<br \/>\n    char s[1024];<br \/>\n    printf(&#034;\u8f93\u5165\u5355\u8bcd\\\\n&#034;);<br \/>\n    scanf(&#034;%s&#034;,s);<br \/>\n    char buff[1024] &#061; {0};<br \/>\n    if(0 &#061;&#061; strcmp(&#034;.quit&#034;,s))<br \/>\n    {<br \/>\n        return 0;<br \/>\n    }<\/p>\n<p>     char *p &#061; fgets(buff,sizeof(buff),fp);<\/p>\n<p>    while(p !&#061; NULL)<br \/>\n    {<br \/>\n        char *b &#061; strtok(buff,&#034; &#034;);<br \/>\n        if(0 &#061;&#061; strcmp(b,s))<br \/>\n        {<br \/>\n            b &#061; strtok(NULL,&#034;\\\\r&#034;);<br \/>\n            printf(&#034;%s%s\\\\n&#034;,s,b);<br \/>\n            break;<br \/>\n        }<br \/>\n    p &#061; fgets(buff,sizeof(buff),fp);<br \/>\n    }<br \/>\n    if(p &#061;&#061; NULL)<br \/>\n    {<br \/>\n        printf(&#034;not find\\\\n&#034;);<br \/>\n        return 0;<br \/>\n    }<br \/>\n    fclose(fp);<\/p>\n<p>}<\/p>\n<\/p>\n<h6>\n<p>\u00a0<\/h6>\n<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb3\u6b21\u3002SEEK_END \uff1a\u4ee5\u6587\u4ef6\u672b\u5c3e\u4e3a\u57fa\u51c6\u8fdb\u884c\u504f\u79fb\uff0c offset  \u5e38\u642d\u914d\u8d1f\u6570\uff0c\u5b9e\u73b0\u4ece\u672b\u5c3e\u5f80\u524d\u5b9a\u4f4d\uff08\u5982  fseek(stream, -10, SEEK_END)  \u8868\u793a\u5b9a\u4f4d\u5230\u6587\u4ef6\u672b\u5c3e\u5411\u524d 10 \u5b57\u8282\u5904 \uff09\u3002-  offset \uff1a\u504f\u79fb\u91cf\uff0c\u7528\u4e8e\u6307\u5b9a\u76f8\u5bf9\u4e8e  whence  \u4f4d\u7f6e\u79fb\u52a8\u7684\u5b57\u8282\u6570\uff0c\u53ef\u6b63\uff08\u5411\u540e\u79fb\u52a8  \uff09\u3001\u53ef\u8d1f\uff08\u5411\u524d\u79fb\u52a8  \uff0c\u4f46\u9700\u6ce8\u610f\u4e0d\u80fd\u8d8a\u754c \uff09\u3002- \u6210\u529f\uff1a\u8fd4\u56de\u5f53\u524d\u622a\u53d6\u5230\u7684\u5b50\u4e32\u9996\u5730\u5740\uff08\u5982\u5206\u5272  &quot;a,b,c&quot;  \uff0c\u9996\u6b21\u8fd4\u56de  &quot;a&quot;  \u7684\u5730\u5740\uff0c\u540e\u7eed\u4f9d\u6b21\u8fd4\u56de  &quot;b&quot; \u3001 &quot;c&quot;  \uff09\u3002<\/p>\n","protected":false},"author":2,"featured_media":52900,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[371],"topic":[],"class_list":["post-52901","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-371"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Linux\u5b66\u4e60-\u5e94\u7528\u8f6f\u4ef6\u7f16\u7a0b\uff08fread\/fwrite\uff0c\u6d41\u5b9a\u4e49\u76f8\u5173\u63a5\u53e3\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/52901.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Linux\u5b66\u4e60-\u5e94\u7528\u8f6f\u4ef6\u7f16\u7a0b\uff08fread\/fwrite\uff0c\u6d41\u5b9a\u4e49\u76f8\u5173\u63a5\u53e3\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb3\u6b21\u3002SEEK_END \uff1a\u4ee5\u6587\u4ef6\u672b\u5c3e\u4e3a\u57fa\u51c6\u8fdb\u884c\u504f\u79fb\uff0c offset \u5e38\u642d\u914d\u8d1f\u6570\uff0c\u5b9e\u73b0\u4ece\u672b\u5c3e\u5f80\u524d\u5b9a\u4f4d\uff08\u5982 fseek(stream, -10, SEEK_END) \u8868\u793a\u5b9a\u4f4d\u5230\u6587\u4ef6\u672b\u5c3e\u5411\u524d 10 \u5b57\u8282\u5904 \uff09\u3002- offset \uff1a\u504f\u79fb\u91cf\uff0c\u7528\u4e8e\u6307\u5b9a\u76f8\u5bf9\u4e8e whence \u4f4d\u7f6e\u79fb\u52a8\u7684\u5b57\u8282\u6570\uff0c\u53ef\u6b63\uff08\u5411\u540e\u79fb\u52a8 \uff09\u3001\u53ef\u8d1f\uff08\u5411\u524d\u79fb\u52a8 \uff0c\u4f46\u9700\u6ce8\u610f\u4e0d\u80fd\u8d8a\u754c \uff09\u3002- \u6210\u529f\uff1a\u8fd4\u56de\u5f53\u524d\u622a\u53d6\u5230\u7684\u5b50\u4e32\u9996\u5730\u5740\uff08\u5982\u5206\u5272 &quot;a,b,c&quot; \uff0c\u9996\u6b21\u8fd4\u56de &quot;a&quot; \u7684\u5730\u5740\uff0c\u540e\u7eed\u4f9d\u6b21\u8fd4\u56de &quot;b&quot; \u3001 &quot;c&quot; \uff09\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/52901.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-08-11T13:19:22+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250811131920-6899edd8c7251.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/52901.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/52901.html\",\"name\":\"Linux\u5b66\u4e60-\u5e94\u7528\u8f6f\u4ef6\u7f16\u7a0b\uff08fread\/fwrite\uff0c\u6d41\u5b9a\u4e49\u76f8\u5173\u63a5\u53e3\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-08-11T13:19:22+00:00\",\"dateModified\":\"2025-08-11T13:19:22+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/52901.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/52901.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/52901.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Linux\u5b66\u4e60-\u5e94\u7528\u8f6f\u4ef6\u7f16\u7a0b\uff08fread\/fwrite\uff0c\u6d41\u5b9a\u4e49\u76f8\u5173\u63a5\u53e3\uff09\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Linux\u5b66\u4e60-\u5e94\u7528\u8f6f\u4ef6\u7f16\u7a0b\uff08fread\/fwrite\uff0c\u6d41\u5b9a\u4e49\u76f8\u5173\u63a5\u53e3\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/52901.html","og_locale":"zh_CN","og_type":"article","og_title":"Linux\u5b66\u4e60-\u5e94\u7528\u8f6f\u4ef6\u7f16\u7a0b\uff08fread\/fwrite\uff0c\u6d41\u5b9a\u4e49\u76f8\u5173\u63a5\u53e3\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb3\u6b21\u3002SEEK_END \uff1a\u4ee5\u6587\u4ef6\u672b\u5c3e\u4e3a\u57fa\u51c6\u8fdb\u884c\u504f\u79fb\uff0c offset \u5e38\u642d\u914d\u8d1f\u6570\uff0c\u5b9e\u73b0\u4ece\u672b\u5c3e\u5f80\u524d\u5b9a\u4f4d\uff08\u5982 fseek(stream, -10, SEEK_END) \u8868\u793a\u5b9a\u4f4d\u5230\u6587\u4ef6\u672b\u5c3e\u5411\u524d 10 \u5b57\u8282\u5904 \uff09\u3002- offset \uff1a\u504f\u79fb\u91cf\uff0c\u7528\u4e8e\u6307\u5b9a\u76f8\u5bf9\u4e8e whence \u4f4d\u7f6e\u79fb\u52a8\u7684\u5b57\u8282\u6570\uff0c\u53ef\u6b63\uff08\u5411\u540e\u79fb\u52a8 \uff09\u3001\u53ef\u8d1f\uff08\u5411\u524d\u79fb\u52a8 \uff0c\u4f46\u9700\u6ce8\u610f\u4e0d\u80fd\u8d8a\u754c \uff09\u3002- \u6210\u529f\uff1a\u8fd4\u56de\u5f53\u524d\u622a\u53d6\u5230\u7684\u5b50\u4e32\u9996\u5730\u5740\uff08\u5982\u5206\u5272 &quot;a,b,c&quot; \uff0c\u9996\u6b21\u8fd4\u56de &quot;a&quot; \u7684\u5730\u5740\uff0c\u540e\u7eed\u4f9d\u6b21\u8fd4\u56de &quot;b&quot; \u3001 &quot;c&quot; \uff09\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/52901.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-08-11T13:19:22+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250811131920-6899edd8c7251.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"5 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/52901.html","url":"https:\/\/www.wsisp.com\/helps\/52901.html","name":"Linux\u5b66\u4e60-\u5e94\u7528\u8f6f\u4ef6\u7f16\u7a0b\uff08fread\/fwrite\uff0c\u6d41\u5b9a\u4e49\u76f8\u5173\u63a5\u53e3\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-08-11T13:19:22+00:00","dateModified":"2025-08-11T13:19:22+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/52901.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/52901.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/52901.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Linux\u5b66\u4e60-\u5e94\u7528\u8f6f\u4ef6\u7f16\u7a0b\uff08fread\/fwrite\uff0c\u6d41\u5b9a\u4e49\u76f8\u5173\u63a5\u53e3\uff09"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/52901","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=52901"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/52901\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/52900"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=52901"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=52901"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=52901"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=52901"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}