Your Browser is not longer supported
Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...
{{viewport.spaceProperty.prod}}
sscanf - Formatted input from a string
&pagelevel(4)&pagelevel
Definition | #include <stdio.h> int sscanf(const char *s, const char *format, argumentlist); sscanf reads data (input fields) from a string s, converts the data according to specifications in the format string format, and stores the results in areas which you specify with the result pointers in the argument list.
sscanf works like scanf , except that the input fields are read from a string and not from the standard input (stdin ).
|
Parameters | const char *s String containing the input data. It should be terminated with the null byte (\0). const char *format Format string as described under scanf with KR or ANSI functionality (cf. scanf ). argumentlist Pointers to variables in which sscanf is to store the converted results. No pointer arguments may be specified for %* statements (skip assignment) in format. There must be one pointer argument each for all other % statements. The data type of the pointer argument is determined by the type specification of the corresponding format statement. |
Return val. | Number of input fields read and successfully converted. |
| This does not include any input fields for which %* (skip assignment) was specified. |
EOF | if an error occurred before the start of the conversion. |
Notes | The result is undefined if memory areas overlap. A detailed description, notes, and examples relating to formatted input can be found under scanf . |
See also | scanf, fscanf |