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.
Get C in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.