putc.3s
来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 3S 代码 · 共 76 行
3S
76 行
.\" SCCSID: @(#)putc.3s 8.1 9/11/90.TH putc 3s .SH Nameputc, putchar, fputc, putw \- put character or word on a stream.SH Syntax.B #include <stdio.h>.PP.B int putc\^(\fIc, stream\fP).nf.B char \fIc\fP;.B FILE \fI*stream\fP;.B putchar\^(\fIc\fP).B fputc\^(\fIc, stream\fP).B FILE \fI*stream\fP.B putw\^(\fIw, stream\fP).B FILE \fI*stream\fP;.fi.SH Description.NXR "putc subroutine" .NXR "standard IO" "subroutines for".NXR "putchar subroutine".NXR "putw subroutine".NXR "fputc subroutine".NXR "stream" "putting character on".NXR "stream" "putting word on"The.PN putcroutine appends the character.I cto the named output.IR stream .It returns the character written..PPThe.PN putchar(c)routine is defined as .PN putc(c, stdout)..PPThe.PN fputcroutine behaves like .PN putc ,but is a genuine function rather than a macro..PPThe.PN putwroutine appends word (that is,.BR int ).I wto the output.IR stream .It returns zero. The.PN putwroutine neither assumes nor causes special alignment in the file..SH RestrictionsBecause it is implemented as a macro,.PN putctreats a stream argument with side effects incorrectly.In particular, `putc\^(c, *f++)\^;' doesn't work as expected..SH DiagnosticsThe.PN putc ,.PN putchar ,and.PN fputcfunctions return the constant EOF upon error. The.PN putwfunction returns a non-zero value on error..SH See Alsofclose(3s), fopen(3s), fread(3s), getc(3s), printf(3s), puts(3s)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?