當前位置:首頁 » 編程語言 » 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;
}

熱點內容
安全的linux 發布:2025-07-14 02:48:39 瀏覽:89
我的世界好的極限生存伺服器 發布:2025-07-14 02:34:59 瀏覽:997
c語言格式錯誤 發布:2025-07-14 02:34:51 瀏覽:529
xp系統清理緩存文件夾 發布:2025-07-14 02:29:09 瀏覽:871
編譯並運行以下程序的結果是 發布:2025-07-14 02:28:22 瀏覽:591
java的業務流程 發布:2025-07-14 02:25:23 瀏覽:352
linuxprocess 發布:2025-07-14 02:24:36 瀏覽:808
手機版伺服器生存有什麼好玩的服務 發布:2025-07-14 01:49:45 瀏覽:210
銳龍3代編程 發布:2025-07-14 01:48:22 瀏覽:968
配置管理需要會什麼 發布:2025-07-14 01:35:35 瀏覽:373