본문 바로가기

Native/C

fseek

[code]
#include <Turboc.h>

void main()
{
FILE *f;
char buf[256];

f=fopen("c:\\Test.txt","rt");

if (f!=NULL) {
     fseek(f,24,SEEK_SET);
     fgets(buf,256,f);
     printf("%s",buf);
     fclose(f);
}
}
[/code]

'Native > C' 카테고리의 다른 글

[레퍼런스] abs()  (0) 2013.10.02
구조체 배열 파일로 저장하기  (0) 2013.10.02
fread  (0) 2013.10.02
fgets  (0) 2013.10.02
fopen  (0) 2013.10.02