••• Unprocessable paragraph: \start
Home Segments Index Top Previous Next

586: Mainline

\slidefont

••• Unprocessable paragraph: In most \code{printf} statements, the string argument contains \hide{\string\code{printf} specifications} \bold{print specifications}, marked by specification-introducing percent signs. Each print specification determines how a corresponding argument value is to be displayed. In the following example, the string contains two print specifications, \code{indicates that the next argument value is assumed to be a string, and marks where that string is to be placed. The \code{the next argument value is assumed to be an integer, and marks where that integer is to be placed: \begincode printf ("The capacity of the "box", 4703); \noshow \result ! The capacity of the box car is 4703. \endcode When this \code{printf} statement is executed, the result is as follows: \begincode The capacity of the box car is 4703. \endcode Of course, you get the same result with the following \cpp/ output statement: \begincode cout << "The capacity of the " << "box" << " car is " << 4703 << "." << endl; \endcode \par C:\Phw\Onto\CPP\formatc.tex ••• C:\Phw\Onto\CPP\formatc.tex •••