1 #include <stdio.h> 2 #include <string.h> 3 4 int main() 5 { 6 FILE *fp; 7 fp=fopen("c:\1.txt","r"); 8 char buf[1024]; 9 while((fgets(buf,1024,fp))!=NULL) 10 { 11 int i=strlen(buf); 12 if(buf[i-1]==' ') 13 { 14 buf[i-1]='
1 #include <stdio.h> 2 #include <string.h> 3 4 int main() 5 { 6 FILE *fp; 7 fp=fopen("c:\1.txt","r"); 8 char buf[1024]; 9 while((fgets(buf,1024,fp))!=NULL) 10 { 11 int i=strlen(buf); 12 if(buf[i-1]==' ') 13 { 14 buf[i-1]='