*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: gets | Section: 3 | Source: UNIX v7 | File: gets.3s
GETS(3S) GETS(3S) NAME gets, fgets - get a string from a stream SYNOPSIS #include <stdio.h> char *gets(s) char *s; char *fgets(s, n, stream) char *s; FILE *stream; DESCRIPTION Gets reads a string into s from the standard input stream stdin. The string is terminated by a newline character, which is replaced in s by a null character. Gets returns its argument. Fgets reads n-1 characters, or up to a newline character, whichever comes first, from the stream into the string s. The last character read into s is followed by a null character. Fgets returns its first argument. SEE ALSO puts(3), getc(3), scanf(3), fread(3), ferror(3) DIAGNOSTICS Gets and fgets return the constant pointer NULL upon end of file or er- ror. BUGS Gets deletes a newline, fgets keeps it, all in the name of backward compatibility. GETS(3S)

Navigation Options