Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Telix/SALT v3.15 & RS-232, Hayes - <b>fgetc</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  FGETC

  .  Summary

  fgetc(int <fh>);

  .  Description

  The fgetc function returns the next character from the file rep-
  resented by the file handle <fh>. The file must have been opened for
  reading or from reading and writing, using the fopen function.

  .  Return Value

  Returns the character read if successful, or -1 if the end of the
  file has been reached or an error is encountered.

  .  Example

  int f;
  f = fopen("test.dat", "r");
  while (!feof(f))        // print all the characters in the file
   printc(fgetc(f));

See Also: fopen fputc ASCII table fgets fread fputs fwrite

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson