putchar(3)


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).

   ┌──────────────────────────┬───────────────┬─────────┐
   │InterfaceAttributeValue   │
   ├──────────────────────────┼───────────────┼─────────┤
   │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/XcmsStoreColors.3.html
XcmsStoreColors(3) - set colors (Library - Linux man page)
The XcmsStoreColor function converts the color specified in the XcmsColor structure into RGB values. It then uses this RGB specification in an XColor structure,

manpages/url.7.html
url(7) - uniform resource identifier (URI), including a URL
A Uniform Resource Identifier (URI) is a short string of characters identifying an abstract or physical resource (for example, a web page). A Uniform Resource L

manpages/Tcl_GetPathType.3.html
Tcl_GetPathType(3) - manipulate platform-dependent file path
These procedures have been superceded by the objectified procedures in the FileSystem man page, which are more efficient. These procedures may be used to disass

manpages/ldap_result2error.3.html
ldap_result2error(3) - LDAP protocol error handling routines
The ldap_err2string() routine provides short description of the various codes returned by routines in this library. The returned string is a pointer to a static

manpages/acl_error.3.html
acl_error(3) - convert an ACL error code to a text message
The acl_error() function converts an ACL error code such as returned by the acl_check() function to a text message describing the error condition. In the POSIX

manpages/Mail::SpamAssassin::DnsResolver.3pm.html
Mail::SpamAssassin::DnsResolver(3pm) - DNS resolution engine
This is a DNS resolution engine for SpamAssassin, implemented in order to reduce file descriptor usage by Net::DNS and avoid a response collision bug in that mo

manpages/updateinfoxml2solv.1.html
updateinfoxml2solv(1) convert rpmmd's updateinfo.xml format
The updateinfoxml2solv tool reads rpm-mds updateinfo xml data from stdin, and writes it as solv file to standard output. Update elements are converted into spec

manpages/shutdown_mib.3.html
shutdown_mib(3) - netsnmp_mib_api functions - Linux man page
The functions dealing with MIB modules fall into four groups - those dealing with initialisation and shutdown, with reading in and parsing MIB files, with searc

manpages/git-filter-branch.1.html
git-filter-branch(1) - Rewrite branches - Linux manual page
Lets you rewrite Git revision history by rewriting the branches mentioned in the &lt;rev-list options&gt;, applying custom filters on each revision. Those filters can

manpages/amixer.1.html
amixer(1) - command-line mixer for ALSA soundcard driver....
amixer allows command-line control of the mixer for the ALSA soundcard driver. amixer supports multiple soundcards. amixer with no arguments will display the cu

manpages/XrmCombineFileDatabase.3.html
XrmCombineFileDatabase(3) - merge resource databases........
Calling the XrmMergeDatabases function is equivalent to calling the XrmCombineDatabase function with an override argument of True. The XrmCombineDatabase functi

manpages/XRRSetScreenConfigAndRate.3.html
XRRSetScreenConfigAndRate(3) - X Resize, Rotate and Reflecti
Xrandr is a simple library designed to interface the X Resize and Rotate Extension. This allows clients to change the size and rotation of the root window of a





We can't live, work or learn in freedom unless the software we use is free.