#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<math.h>
#include<time.h>
int main() {
FILE* f = fopen("test.txt", "r");
if (f == NULL) {
perror("fopen");
return -1;
}
/*int ch = fgetc(f);*/是fgetc
char ch = fgetc(f);
printf("%c\n", ch);
//fseek(f, -3, SEEK_END);//ABCDERGHJKLOPE会打印出来0,向前移3位0
//fseek(f, 2, SEEK_SET);AC
fseek(f, 6, SEEK_CUR);//AH
ch = fgetc(f);
printf("%c\n", ch);
fclose(f);
f = NULL;
system("pause");
return 0;
}