Name
sscanf
Synopsis
Reads formatted data from a string
#include <stdio.h> intsscanf( const char * restrictsrc, const char * restrictformat, ... );
The sscanf() function is
similar to scanf(), except that
it reads input items from the string addressed by its first pointer
argument, src, rather than from stdin. Reading to the null character
before the entire format string has been processed causes an input
failure.
See Also
scanf(), fscanf(), and sscanf(), declared in
stdio.h; vscanf(), vsscanf(), and vfscanf(), declared in stdarg.h; fwscanf(), wscanf(), vwscanf(), vfwscanf(), and vswscanf(), declared in wchar.h; the printf() output
functions. Argument conversion in the scanf() family of
functions is described in detail under scanf() in this
chapter.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access