Formatted Input/OutputOutlineFormatting Output with printfPrinting IntegersEscape CharactersPrinting Floating-Point NumbersPrinting Strings and pointersField Widths and PrecisionsFlagsFormatting Input with scanfSample ProblemFunction getnum()Extensions in ChDefault Formatted Input and OutputFormatted Block of Output Using fprintf
This preview has intentionally blurred sections.
Sign up to view the full version.
Formatting Output with printfPrecisely formatted output is accomplished using the output functionprintf. The printffunction has following form printf( format-control-string, arguments );–Format-control-string: Using specifications to describe output format. Each specification begins with a percent sign (%), ends with conversion specifier and is enclosed in quotation marks. –arguments: correspond to each conversion specification in format-control-string.