include int main(void){FILE fp = NULL;char buf[1024]= {0};char p = buf;fp = fopen("./tt","r+");//注:知当前目录下道的版tt文件已存在权if(NULL == fp){return 0;}fseek(fp,0,SEEK_SET);while(1 == fscanf(fp,"%s",p)){p = buf + strlen(buf);*p++ = '$';...
调用fputs函数,把10个字符串输出到文件中,再从此文件中读入这10个字符串放在一个字符串数组中;最后把字符串数组中的字符串输出到终端屏幕。 源程序: #include <stdio.h> #include <stdlib.h> int main() { int i; char s[100]; FILE *fp; if((fp=fopen("e:\\file.txt","w+"))==NULL) { prin...
你确实开了你所说的字符串指针数组,但你并没有分配指针指向的内存空间。你如果一下子还没有发现,你...