Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ Language Reference - fgetc http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   fgetc
   Usage
   #include <stdio.h>
   int fgetc(FILE *fp);

   Description
   fgetc  reads  and returns the next character from the stream  fp.  The
   character is returned as an integer in the range of 0 to 255.

   Example
   #include <stdio.h>
   main()
   {
   int ch;
        fputs("Enter data terminated by Ctrl-Z: ",stdout);
        while((ch = fgetc(stdin)) != EOF) fputc(ch,stdout);
   }

   Return Value
   Returns the character just read on success, or EOF if end-of-file or a
   read error is encountered. Note that the return value should always be
   assigned to a variable of type int,  or an error cannot be detected.


See Also: fputc putchar getc getchar getche getch

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