.TH fwrite() "" "" "STDIO Function (libc)"
.PC "Write into file stream"
.B "#include <stdio.h>"
\fBint fwrite(\fIbuffer, size, n, fp\^\fB)\fR
\fBchar *\fIbuffer\^\fB; unsigned \fIsize, n\^\fB; FILE *\fIfp\^\fB;\fR
.PP
.B fwrite()
writes
.I n
items, each of
.I size
bytes, from
.I buffer
into the file stream pointed to by
.IR fp .
.SH Example
For an example of how to use this function, see the entry for
.BR fopen() .
.SH "See Also"
.Xr "fread()," fread
.Xr "libc" libc
.br
\*(AS, \(sc7.9.8.2
.br
\*(PX Standard, \(sc8.1
.SH Diagnostics
.B fwrite()
normally returns the number of items written.
If an error occurs, the returned value will not be the same as
.IR n .
