Currently At: Programming Reference > C Reference > Stndard C I/O > getc()

getc()


Syntax:
#include <stdio.h>
int getc( FILE *stream );


Description:
The getc() function returns the next character from stream, or EOF if the end of file is reached. getc() is identical to |fgetc()|.

Example:
char ch;
FILE *input = fopen( "stuff", "r" );

ch = getc( input );
while( ch != EOF ) {
  printf( "%c", ch );
  ch = getc( input );
}


Related Topics:
fputc(), fgetc(), putc(), fopen()


Web Standards & Support:

Link to and support eLook.org Powered by LoadedWeb Web Hosting
Valid XHTML 1.0! Valid CSS! eLook.org FireFox Extensions