data.txt 라는 놈에다가 영문자 졸라구 쳐 놓고

불러 올때 r 로 불러와서

fputc 로 하니깐 문자가 웨겕웨렉 해지네 ``

소스는 이거

#include <stdio.h>

int main()
{
 char ch;
 int i=1;
 
 FILE *fp;
 fp = fopen(\"data.txt\",\"r\");

 if(fp == NULL)
 {
  printf(\"can not open file DATA\\n\");
  exit(1);
 }
 
 while((ch=fgetc(fp) != EOF))
 {
  printf(\"%d. \",i);
  putchar(ch);
  if(ch == \'\\n\')
   i++;
 }

 fclose(fp);

 return 0;
}