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

📄 getc.3

📁 操作系统设计与实现源码
💻 3
字号:
.\"	@(#)getc.3s	6.2 (Berkeley) 5/14/86.\".TH GETC 3  "May 14, 1986".AT 3.SH NAMEgetc, getchar, fgetc, getw \- get character or word from stream.SH SYNOPSIS.nf.ft B#include <stdio.h>int getc(FILE *\fIstream\fP)int getchar(void)int fgetc(FILE *\fIstream\fP)int getw(FILE *\fIstream\fP).ft R.fi.SH DESCRIPTION.B Getcreturns the next character from the named input.IR stream ..PP.BR Getchar ()is identical to .BR getc ( stdin )..PP.B Fgetcbehaves like .BR getc ,but is a genuine function, not a macro;it may be used to save object text..PP.B Getwreturns the next.B intfrom the named input.IR stream .It returns the constant.SM.B EOFupon end of file or error, but since that is a goodinteger value,.B feofand.BR ferror (3)should be used to check the success of.BR getw ..B Getwassumes no special alignment in the file..SH "SEE ALSO".BR clearerr (3),.BR fopen (3),.BR putc (3),.BR gets (3),.BR scanf (3),.BR fread (3),.BR ungetc (3)..SH DIAGNOSTICSThese functions return the integer constant.SM.B EOFat end of file, upon read error,or if an attempt is made to read a file not opened by.BR fopen .The end-of-file condition is remembered,even on a terminal,and all subsequent attempts to read will return.B EOFuntil the condition is cleared with.BR clearerr (3)..SH BUGSBecause it is implemented as a macro,.B 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 + -