| You are here: | About>Computing & Technology>C / C++ / C#> C> C Tutorials> Specifying Output Formats |
![]() | C / C++ / C# |
Elsewhere on the WebC Tutorial Lesson Two - Handling NumbersSpecifying Output Formats in PrintfPrintf() is a very powerful function. It can display multiple variables in one statement with a wide range of output formats. It is a variadic function taking a varying number of parameters.
The format of printf is like this: printf("output String including 0 or more Format Specifiers", expression1,expression 2...expression n) ; A Format Specifier is a two character symbol. The frst character is always a % and the second a letter from the list below. Here is a full list of Format Specifiers. %c The character format specifier. Additionally we can add modifers to specify the width of the output fields. On the next page we'll see this and some examples. On the Next Page : Learn more about Format specifiers.
Elsewhere on the Web |
Las Vegas on a BudgetFind a BargainHotel DealsCheap EatsFree AttractionsEntertainment for Less |
All Topics | Email Article | Print this Page | | ![]() |
| Advertising Info | News & Events | Work at About | SiteMap | Reprints | Help | Our Story | Be a Guide |
| User Agreement | Ethics Policy | Patent Info. | Privacy Policy | ©2008 About, Inc., A part of The New York Times Company. All rights reserved. |


