Reads formatted data from a string #include <stdio.h> int sscanf ( const char * restrict src , const char * restrict format , ... ); 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. ExampleSee the examples at fscanf( ) and strspn( ) in this chapter. See Alsoscanf( ), 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. |