scanf


Also found in: Wikipedia.

scanf

The C library routine that reads data from the standard input stream stdin into the locations given by each entry in its argument list. The first argument is a format string which controls interpretation of the input and each subsequent argument points to a variable with a type that corresponds to a type specifier in the format-string.

Unix manual page: scanf(3).
Mentioned in ?
References in periodicals archive ?
Jatin Arora of Delhi's Scanf Solutions invoked the adage seeing is believing, when the undercover journalist spoke with him.
Assignment is synonymous with value-setting statement; thus, scanf is considered an assignment.
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.
Similarly, once they recognized READ-PROCESS-LOOP, they noticed the scanf was reading numeric values, specialized the plan to READ-PROCESS-VALUE-LOOP, and then took advantage of the EOF to specialize the plan further to READ-PROCESS-ALL-VALUES.