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

Usage

   #include <stdio.h>
   int getchar(void);

   ANSI

Description

   getchar obtains a character from the stream stdin.

Example 

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

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

   }

Return Value

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

See Also

   fgetc, getc, getch, getche, putc, putchar, ungetc



See Also: fgetc getc getch getche putc putchar ungetc

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