eturn 0;Р }Р for (j = sq->length; j > i; j--)Р {Р memcpy(et+j, et+j-1, sizeof(elem_type));Р }Р sq->length++;Р strcpy(et[i].word, word);Р et[i].count = 1;Р return 0;Р}Рint sqlist_count(sqlist *sq, elem_type *et)Р{Р int i, j = 0;Р for(i=0;i<sq->length;i++)Р j=j+et[i].count;Р return j;Р}Рint creat_text_file()Р{Р elem_type w;Р sqlist s;Р char file_name[FILE_NAME_LEN + 1],yn;Р FILE *fp;Р printf("输入要建立的文件名:");Р scanf("%s",file_name);Р fp=fopen(file_name,"w");Р yn='n';?/* 输入结束标志初值*/Р while(yn=='n'||yn=='N')Р {Р printf("请输入一行文本:");Р gets(w.word);Р gets(w.word);Р s.length=strlen(w.word);Р fwrite(&w,s.length,1,fp);Р fprintf(fp,"%c",10);?/* 是输入换行*/Р printf("结束输入吗?y or n :");yn=getchar();Р }Р fclose(fp);?/* 关闭文件*/Р printf("建立文件结束!\n");Р return 0;Р}Рint substrsum()Р{Р char file_name[FILE_NAME_LEN + 1];