qfedu-c-level/day14/d8.c

18 lines
291 B
C
Raw Normal View History

2023-07-21 00:58:46 +08:00
#include <stdio.h>
#include <string.h>
int main()
{
FILE *f = fopen("d8.txt", "r");
fseek(f, 3, SEEK_SET); // SEEK_SET 0
char m[7];
for (int i = 0; i < 6; i++)
{
m[i] = (char)fgetc(f);
}
m[6] = '\0';
printf("%s\n", m);
fclose(f);
return 0;
}