Visit Our UNIX and Linux User Community

Linux and UNIX Man Pages

Test Your Knowledge in Computers #789
Difficulty: Medium
Steve Wozniak was employed at Sun Microsystems before he founded Apple Computers.
True or False?
Linux & Unix Commands - Search Man Pages

fgetc(3f) [bsd man page]

GETC(3F)																  GETC(3F)

getc, fgetc - get a character from a logical unit SYNOPSIS
integer function getc (char) character char integer function fgetc (lunit, char) character char DESCRIPTION
These routines return the next character from a file associated with a fortran logical unit, bypassing normal fortran I/O. Getc reads from logical unit 5, normally connected to the control terminal input. The value of each function is a system status code. Zero indicates no error occurred on the read; -1 indicates end of file was detected. A positive value will be either a UNIX system error code or an f77 I/O error code. See perror(3F). FILES
/usr/lib/libU77.a SEE ALSO
getc(3S), intro(2), perror(3F) 4.2 Berkeley Distribution May 27, 1986 GETC(3F)

Check Out this Related Man Page

GETC(3) 						     Library Functions Manual							   GETC(3)

getc, getchar, fgetc, getw - get character or word from stream SYNOPSIS
#include <stdio.h> int getc(FILE *stream) int getchar(void) int fgetc(FILE *stream) int getw(FILE *stream) DESCRIPTION
Getc returns the next character from the named input stream. Getchar() is identical to getc(stdin). Fgetc behaves like getc, but is a genuine function, not a macro; it may be used to save object text. Getw returns the next int from the named input stream. It returns the constant EOF upon end of file or error, but since that is a good integer value, feof and ferror(3) should be used to check the success of getw. Getw assumes no special alignment in the file. SEE ALSO
clearerr(3), fopen(3), putc(3), gets(3), scanf(3), fread(3), ungetc(3). DIAGNOSTICS
These functions return the integer constant EOF at end of file, upon read error, or if an attempt is made to read a file not opened by fopen. The end-of-file condition is remembered, even on a terminal, and all subsequent attempts to read will return EOF until the condi- tion is cleared with clearerr(3). BUGS
Because it is implemented as a macro, getc treats a stream argument with side effects incorrectly. In particular, `getc(*f++);' doesn't work sensibly. 7th Edition May 14, 1986 GETC(3)

Featured Tech Videos