Also found in: Wikipedia.


The standard function in the C programming language library for printing formatted output.

The first argument is a format string which may contain ordinary characters which are just printed and "conversion specifications" - sequences beginning with '%' such as %6d which describe how the other arguments should be printed, in this case as a six-character decimal integer padded on the right with spaces.

Possible conversion specifications are d, i or u (decimal integer), o (octal), x, X or p (hexadecimal), f (floating-point), e or E (mantissa and exponent, e.g. 1.23E-22), g or G (f or e format as appropriate to the value printed), c (a single character), s (a string), % (i.e. %% - print a % character). d, i, f, e, g are signed, the rest are unsigned.

The variant fprintf prints to a given output stream and sprintf stores what would be printed in a string variable.

Unix manual page: printf(3).
References in periodicals archive ?
The above code cheats slightly by simply calling the C printf function for the bit that actually prints to screen.
model and II [right arrow] candidate-I2 // choose common samples from candidate-I1 and candidate-I2, and generate the new seed set, candidate-I candidate-I = candidate-I1 n candidate-I2 Until complete the task of classification in text set II End Printf label information of text set II: M-II
25f * (A[j][i+1] + A[j][i-1] + A[j-1][i] + A[j+1][i]); error = fmaxf (error, fabsf (Anew [j][i] - A[j][i])); } } #pragma omp parallel for shared (m, n, Anew, A) #pragma acc kernels for (int j = 1; j < n-1; j++) { for(int i = 1; i < m-1; i++) { A[j][i] = Anew [j][i]; } } if (iter % 100 == 0) printf ("%5d, %0.
For example, sleep was replaced by nanosleep and printf was replaced by write.
i = 0 ; while (i< - 10) { printf ("% 3d %3d \n", i, 50-i) I++; }
Everyonew antsap ieceo fher, evenif it'so nly fleeting- punters backedherat oddso f1-20inher last twostar tsj ust toh avea souvenir ticket,e venthou ght he printf adesawayaf terthr eey ears.
Unsurprisingly, Zami does not comprise "linear, solid blocks of printf Like Oranges Are Not the Only Fruit, much of the book proceeds via association instead of chronologically: Lorde works with themes rather than timelines.
n", dDiff); double dOneFile = dDiff / nCount; printf ("Vieno failo laikas %.
Unlike a C-language printf function, the write instruction requires little CPU overhead because the CPU does not call a lengthy UART or Ethernet routine to output the register data.
El codigo HTML de la pagina web es el resultado del CGI, el argumento de cada printf usado en el codigo en C, se trata de puro lenguaje HTML.
head *header, *tail; int r; header = new_head (); tail = new_head (); tail [right arrow] rank = INFTY; header [right arrow] next = tail; tail [right arrow] prev = header; printf ("Enter r:"); scanf ("%d", &r);
Its implementation stores point coordinates as separate variables, combines a while loop and a scanf to read the input points, computes the distance using a series of arithmetic operations and assignments, and prints the average using printf and an expression which provides an average of 0 if no values are read.