Node:Formatted string input, Next:, Previous:Deprecated string input functions, Up:String output and input

Formatted string input

The formatted string input functions are the opposite of the formatted string output functions. Unlike printf and similar functions, which generate formatted output, scanf and its friends parse formatted input. Like the opposite functions, each accepts, as a parameter, a template string that contains conversion specifiers. In the case of scanf and related functions, however, the conversion specifiers are meant to match patterns in an input string, such as integers, floating point numbers, and character sequences, and store the values read in variables.