#include <stdio.h>
#include <stdlib.h>

int main() {
  FILE *inputfile;         // ファイル構造体へのポインタ
  int c;                   // 読み込んだ1バイトを入れておく
  
  inputfile = fopen("a.txt", "r");    // ファイルを読み出し用にオープン(開く)
  
  while (1) {    // 無限ループ
    c = fgetc(inputfile);     // ファイルから1バイト読み込んで c に入れる
    if (c == EOF) {           // もしファイルの終端に達していたら
      break;                  // while ループから抜け出す
    }
    printf("#%c#\n", c);      // 読んだ文字をそのまま表示
  }
  
  fclose(inputfile);          // ファイルをクローズ(閉じる)
  return 0;
}


