NAME
fputc, fputs, putc, putchar, puts - output of characters and strings
SYNOPSIS
#include <stdio.h> int fputc(int c, FILE *stream); int fputs(const char *s, FILE *stream); int putc(int c, FILE *stream); int putchar(int c); int puts(const char *s);
DESCRIPTION
fputc() writes the character c, cast to an unsigned char, to stream. fputs() writes the string s to stream, without its terminating null byte ('\0'). putc() is equivalent to fputc() except that it may be implemented as a macro which evaluates stream more than once. putchar(c) is equivalent to putc(c, stdout). puts() writes the string s and a trailing newline to stdout. Calls to the functions described here can be mixed with each other and with calls to other output functions from the stdio library for the same output stream. For nonlocking counterparts, see unlocked_stdio(3).
RETURN VALUE
fputc(), putc() and putchar() return the character written as an unsigned char cast to an int or EOF on error. puts() and fputs() return a nonnegative number on success, or EOF on error.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7). ┌──────────────────────────┬───────────────┬─────────┐ │Interface │ Attribute │ Value │ ├──────────────────────────┼───────────────┼─────────┤ │fputc(), fputs(), putc(), │ Thread safety │ MT-Safe │ │putchar(), puts() │ │ │ └──────────────────────────┴───────────────┴─────────┘
CONFORMING TO
POSIX.1-2001, POSIX.1-2008, C89, C99.
BUGS
It is not advisable to mix calls to output functions from the stdio library with low-level calls to write(2) for the file descriptor associated with the same output stream; the results will be undefined and very probably not what you want.
SEE ALSO
write(2), ferror(3), fgets(3), fopen(3), fputwc(3), fputws(3), fseek(3), fwrite(3), putwchar(3), scanf(3), unlocked_stdio(3)
COLOPHON
This page is part of release 4.09 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/.
More Linux Commands
manpages/glRasterPos2dv.3gl.html
glRasterPos2dv(3gl) - specify the raster position for pixel
The GL maintains a 3D position in window coordinates. This position, called the raster position, is used to position pixel and bitmap write operations. It is ma
manpages/utempter_add_record.8.html
libutempter(8) privileged helper program for utmp wtmp updat
utempter is a privileged helper program that writes utmp/wtmp entries for unprivileged programs. OPTIONS The following options are supported: -a slave-device-na
manpages/glColor4sv.3gl.html
glColor4sv(3gl) - set the current color - Linux manual page
The GL stores both a current single-valued color index and a current four-valued RGBA color. glColor sets a new four-valued RGBA color. glColor has two major va
manpages/Tk_UnsetGrid.3.html
Tk_UnsetGrid(3) - control the grid for interactive resizing
Tk_SetGrid turns on gridded geometry management for tkwins toplevel window and specifies the geometry of the grid. Tk_SetGrid is typically invoked by a widget w
manpages/exp2f.3.html
exp2f(3) - base-2 exponential function - Linux manual page
The exp2() function returns the value of 2 raised to the power of x. RETURN VALUE On success, these functions return the base-2 exponential value of x. For vari
manpages/Unicode::Collate::CJK::Big5.3pm.html
Unicode::Collate::CJK::Big5(3pm) - weighting CJK Unified Ide
Unicode::Collate::CJK::Big5 provides weightBig5(), that is adequate for overrideCJK of Unicode::Collate and makes tailoring of CJK Unified Ideographs in the ord
manpages/pnmpsnr.1.html
pnmpsnr(1) - compute the difference between two images (the
This program is part of Netpbm(1) pnmpsnr reads two PBM, PGM, or PPM files, or PAM equivalents, as input and prints the magnitude of difference between the two
manpages/pmap_unset.3.html
pmap_unset(3) - library routines for remote procedure calls
These routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a data packet to the s
manpages/Net::DBus::Exporter.3pm.html
Net::DBus::Exporter.3pm (Manual - Linux man page)..........
The Net::DBus::Exporter module is used to export methods and signals defined in an object to the message bus. Since Perl is a loosely typed language it is not p
manpages/insque.3.html
insque(3) - insert/remove an item from a queue (Man Page)...
The insque() and remque() functions manipulate doubly-linked lists. Each element in the list is a structure of which the first two elements are a forward and a
manpages/XpQueryScreens.3x.html
XpQueryScreens(3x) - Queries an X Server to determine which
This request returns a non-NULL pointer to a list of screen pointers if one or more screens support the X Print Service Extension; otherwise it returns NULL. Xp
manpages/inl.2.html
inl(2) - port I/O (System calls - Linux man page)...........
This family of functions is used to do low-level port input and output. The out* functions do port output, the in* functions do port input; the b-suffix functio
