當前位置:首頁 » 編程語言 » 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-09-16 22:57:39 瀏覽:680
api開發php 發布:2025-09-16 22:06:15 瀏覽:594
mysql自動備份linux 發布:2025-09-16 21:58:33 瀏覽:942
怎麼用自己的伺服器ip做域名 發布:2025-09-16 21:49:57 瀏覽:915
vc為什麼能編譯不能用 發布:2025-09-16 21:48:03 瀏覽:742
編譯原理沖突圖的定義 發布:2025-09-16 21:26:45 瀏覽:808
安卓手機芯哪個牌子好 發布:2025-09-16 21:26:33 瀏覽:206
centos編譯安裝git 發布:2025-09-16 21:19:55 瀏覽:975
安卓系統如何使用手機優盤 發布:2025-09-16 21:14:01 瀏覽:333
在手機上注冊公積金如何設置密碼 發布:2025-09-16 21:07:01 瀏覽:824