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

Usage

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

   ANSI

Description

   getc obtains one character from the stream fp. Input is buffered and
   therefore a carriage return is required before the character is returned.

Example 

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

   int main()

   {
       int c;
       printf("Input a character then press return: ");
       c = getc(stdin);
       printf("%c is an example of getc\n", c);
       return EXIT_SUCCESS;
   }

Return Value

   Returns the next character read. getc returns a value of EOF on error.

See Also

   fgetc, getch, getchar, getche, putc, putchar, ungetc



See Also: fgetc getch getchar getche putc putchar ungetc

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