SSamTure.net

워드프레스

[C언어] 파일 사이즈 구하기

#include<stdio.h>
#include<string.h>

void main(){
 FILE *fp;
 
 fp = fopen(“/home/ssamture/test.txt”,”r”);
 fseek(fp, 0l, SEEK_END);

 printf(“%ld byte n”, ftell(fp);
}

Leave a Reply

Your email address will not be published. Required fields are marked *