⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 getc.3s

📁 unix v7是最后一个广泛发布的研究型UNIX版本
💻 3S
字号:
.TH GETC 3S .SH NAMEgetc, getchar, fgetc, getw \- get character or word from stream.SH SYNOPSIS.B #include <stdio.h>.PP.B int getc(stream).br.SM.B FILE.B *stream;.PP.B int getchar().PP .B int fgetc(stream).br.SM.B FILE.B *stream;.PP.B int getw(stream).br.SM.B FILE.B *stream;.SH DESCRIPTION.I Getcreturns the next character from the named input.IR stream ..PP.I Getchar()is identical to .IR getc(stdin) ..PP.I Fgetcbehaves like .I getc,but is a genuine function, not a macro;it may be used to save object text..PP.I Getwreturns the nextword from the named input.IR stream .It returns the constant.SM.B EOFupon end of file or error, but since that is a goodinteger value,.I feofand.IR  ferror (3)should be used to check the success of.IR getw ..I Getwassumes no special alignment in the file..SH "SEE ALSO"fopen(3), putc(3),gets(3), scanf(3),fread(3),ungetc(3).SH DIAGNOSTICSThese functions return the integer constant.SM.B EOFat end of file or upon read error..PPA stop with message,`Reading bad file', means an attempt has been made toread from a stream that has not been opened forreading by.IR fopen ..SH BUGSThe end-of-file return from.I getcharis incompatible with that in UNIX editions 1-6..PPBecause it is implemented as a macro,.I getctreats a.I streamargument with side effects incorrectly.In particular,`getc(*f++);'doesn't work sensibly.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -