#include <stdio.h>

#include <malloc.h>


void main (){

int i=0;

FILE * fp = fopen("./status.txt","r");

char *status = (char*) malloc (sizeof(15));

fseek(fp,0,SEEK_END);

if(ftell(fp) != 0){

fseek(fp,0,SEEK_SET);

while(!feof(fp)){

*(status + i) = fgetc(fp);

i++;

}

*(status + i) = '\0';

}

fclose(fp);

printf("%s",status);



}


왜그런거지..


fgets 써도그러고 fscanf(fp,"%s",status) 해도 그래요