已知,文件a.txt中的容是abcdefg,那么执行如下代码打印出的结果是: FILE *fp = fopen("a.txt","r"); int i = 0; fseek(fp,3L,SEEK_SET); i = getc(fp); printf("%c\n",i); fseek(fp,-2L,SEEK_CUR); i = getc(fp); printf("%c\n",i);...
考虑到这一点,文件的最后一个字节是在(-1, SEEK_END)处找到的字节,因此(-3, SEEK_END)字节是8。
"a+"))==NULL) { printf("canot open the file."); exit(0); } if...
已知,文件a.txt中的内容是abcdefg,那么执行如下代码打印出的结果是: FILE *fp = fopen("a.txt","r"); int i = 0; fseek(fp,3L,SEEK_SET); i = getc(fp); printf("%c\n",i); fseek(fp,-2L,SEEK_CUR); i = getc(fp); printf("%c\n",i);...