*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Linux man pages -> puts (3)              
Title
Content
Arch
Section
 

PUTS(3)

Contents


NAME    [Toc]    [Back]

       fputc, fputs, putc, putchar, puts - output of characters and strings

SYNOPSIS    [Toc]    [Back]

       #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    [Toc]    [Back]

       fputc() writes the character c, cast to an unsigned char, to stream.

       fputs() writes the string s to stream, without its trailing '\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.

RETURN VALUE    [Toc]    [Back]

       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 non - negative number on success, or EOF on
       error.

CONFORMING TO    [Toc]    [Back]

       ANSI - C, POSIX.1

BUGS    [Toc]    [Back]

       It is not advisable to mix calls to output  functions  from  the  stdio
       library with low - level calls to write() for the file descriptor associated
 with the same output stream; the results will be	undefined  and
       very probably not what you want.

SEE ALSO    [Toc]    [Back]

      
      
       write(2), fopen(3), fwrite(3), scanf(3), gets(3), fseek(3), ferror(3)



GNU				  1993-04-04			       PUTS(3)
[ Back ]
 Similar pages
Name OS Title
gets Linux input of characters and strings
strings OpenBSD print the strings of printable characters in files
strings NetBSD print the strings of printable characters in files
strings Linux print the strings of printable characters in files.
strings FreeBSD print the strings of printable characters in files.
strncmp Tru64 General: Compares two strings, using a specified number of characters
swprintf Tru64 Print formatted output for wide characters
fputws FreeBSD output a line of wide characters to a stream
wprintf Tru64 Print formatted output for wide characters
fwprintf Tru64 Print formatted output for wide characters
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service