www.delorie.com/djgpp/doc/libc/libc_317.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

fgetc

Syntax

 
#include <stdio.h>

int fgetc(FILE *file);

Description

Returns the next character in the given file as an unsigned char.

Return Value

The given char (value 0..255) or EOF at end-of-file.

Portability

ANSI/ISO C C89; C99
POSIX 1003.2-1992; 1003.1-2001

Example

 
int c;
while((c=fgetc(stdin)) != EOF)
  fputc(c, stdout);


  webmaster     delorie software   privacy  
  Copyright © 2004     Updated Apr 2004