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++ 3.0r4 - <b>fgetc</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
fgetc

Usage

   #include <stdio.h>
   int fgetc(FILE *fp);

   ANSI

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>
   #include <stdlib.h>

   int main()
   {

       int ch;
       fputs("Enter data terminated by Ctrl-Z: ",stdout);
       while((ch = fgetc(stdin)) != EOF) fputc(ch,stdout);
       return EXIT_SUCCESS;
   }

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.



See Also: fputc putchar getc getchar getche getch

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