for some reason, when I print phrase in the following code I discover that the fgets function doesn't get the last characater in the text file. I already checked mone1 and saw that its given enough space for the text in the file. Does someone have an explanation and a soloution to that occurrence?
Tnx, Dean.
ps我很确定字符串的长度不是问题,因为即使我将它更改为2个字符它仍然只打印第一个字符(不打印最后一个字符),并且它们都写在同一行.
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char * argv[])
{
printf("ss");
FILE * sent=NULL;
FILE * voca=NULL;
sent=fopen(argv[1],"r");
voca=fopen(argv[2],"r");
if(voca==NULL){
printf("cannot open …Run Code Online (Sandbox Code Playgroud)