Stdio H C

//Header file:     #include   
//Declaration:     int getc(FILE *stream); 
//Return:          returns EOF on file end or error. 
  
  #include 
  #include 
  int main(int argc, char *argv[])
  {
    FILE *fp;
    char ch;
    if((fp=fopen("test", "r"))==NULL) {
      printf("Cannot open file.\n");
      exit(1);
    }
    while((ch=getc(fp))!=EOF) {
      printf("%c", ch);
    }
    fclose(fp);
    return 0;
  }