www.delorie.com/gnu/docs/glibc/libc_190.html   search  
 
Buy the book!


The GNU C Library

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

12.12 Formatted Output

The functions described in this section (printf and related functions) provide a convenient way to perform formatted output. You call printf with a format string or template string that specifies how to format the values of the remaining arguments.

Unless your program is a filter that specifically performs line- or character-oriented processing, using printf or one of the other related functions described in this section is usually the easiest and most concise way to perform output. These functions are especially useful for printing error messages, tables of data, and the like.

12.12.1 Formatted Output Basics  Some examples to get you started.
12.12.2 Output Conversion Syntax  General syntax of conversion specifications.
12.12.3 Table of Output Conversions  Summary of output conversions and what they do.
12.12.4 Integer Conversions  Details about formatting of integers.
12.12.5 Floating-Point Conversions  Details about formatting of floating-point numbers.
12.12.6 Other Output Conversions  Details about formatting of strings, characters, pointers, and the like.
12.12.7 Formatted Output Functions  Descriptions of the actual functions.
12.12.8 Dynamically Allocating Formatted Output  Functions that allocate memory for the output.
12.12.9 Variable Arguments Output Functions  vprintf and friends.
12.12.10 Parsing a Template String  What kinds of args does a given template call for?
12.12.11 Example of Parsing a Template String  Sample program using parse_printf_format.


  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003