當前位置:首頁 » 編程語言 » c語言刪除單詞

c語言刪除單詞

發布時間: 2023-07-27 20:25:11

1. c語言執行命令快捷鍵是什麼

1、重置配置的方法:

2. 求助C語言 刪除文本文件內的指定字元串

#include<stdio.h>
#include<string.h>

intmain(){
charinfilename[]="indata.txt";
charoutfilename[]="outdata.txt";
charstr[81];//假定每個文件名不超過80個字元
chars[81];
FILE*fin,*fout;
fin=fopen(infilename,"rt");
fout=fopen(outfilename,"wt");
if(fin==NULL||fout==NULL){
printf("不能打開文件。 ");
return1;
}
printf("待刪除的字元串:");
gets(str);
while(fgets(s,81,fin))
if(strcmp(str,s))fprintf(fout,"%s",s);
fclose(fin);
fclose(fout);
return0;
}

熱點內容
密碼多少密碼多少密碼多少密碼 發布:2025-02-07 14:07:30 瀏覽:854
我的世界啟動器電腦伺服器 發布:2025-02-07 14:07:27 瀏覽:482
愛加密深圳科技有限 發布:2025-02-07 14:07:26 瀏覽:85
c語言密碼星號 發布:2025-02-07 14:07:24 瀏覽:798
安卓手機如何卸載雜志鎖屏 發布:2025-02-07 13:57:10 瀏覽:919
個性網源碼 發布:2025-02-07 13:49:42 瀏覽:473
sql連接update 發布:2025-02-07 13:46:33 瀏覽:575
資料庫導出sql語句 發布:2025-02-07 13:45:26 瀏覽:148
traceandroid 發布:2025-02-07 13:43:05 瀏覽:883
微信公眾平台開發java 發布:2025-02-07 13:31:13 瀏覽:935