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

📄 putc.3s

📁 unix v7是最后一个广泛发布的研究型UNIX版本
💻 3S
字号:
.TH PUTC 3S .SH NAMEputc, putchar, fputc, putw \- put character or word on a stream.SH SYNOPSIS.B #include <stdio.h>.PP.B int putc(c, stream).br.B char c;.br.SM.B FILE.B *stream;.PP.B putchar(c).PP.B fputc(c, stream).br.SM.B FILE.B *stream;.PP.B putw(w, stream).br.SM.B FILE.B *stream;.SH DESCRIPTION.I Putcappends the character.I cto the named output.IR stream .It returns the character written..PP.I Putchar(c)is defined as .I "putc(c, stdout).".PP.I Fputcbehaves like .I putc,but is a genuine function rather than a macro.It may be used to save on object text..PP.I Putwappends word (i.e..BR int ).I wto the output.IR stream .It returns the word written..I Putwneither assumes nor causes special alignment in the file..PPThe standard stream.I stdoutis normally buffered if and only if theoutput does not refer to a terminal;this default may be changed by.IR setbuf (3).The standard stream.I stderris by default unbuffered unconditionally,but use of.I freopen(see.IR fopen (3))will cause it to become buffered;.IR setbuf ,again, will set the state to whatever is desired.When an output stream is unbuffered information appears on thedestination file or terminal as soon as written;when it is buffered many characters are saved up and written as a block..I Fflush(see .IR fclose (3))may be used to force the block out early..SH "SEE ALSO"fopen(3), fclose(3), getc(3),puts(3), printf(3),fread(3).SH DIAGNOSTICSThese functions return the constant.SM.B EOFupon error.Since this is a good integer,.IR  ferror (3)should be used to detect .I putwerrors..SH BUGSBecause it is implemented as a macro,.I putctreats a.I streamargument with side effects improperly.In particular`putc(c, *f++);'doesn't work sensibly.

⌨️ 快捷键说明

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