Other Functions

sscanf

The opposite of sprintf() is sscanf(), which reads a string and allows for simple parsing of strings. It's a little tricky to use so you may need to seearch for some examples online.

Note: sscanf() does not support the %f scanning option to scan for floating point numbers! You must instead use atof() to convert an ASCII decimal floating point number to a float.

Variation Supported Purpose
sscanf() Scan a buffer of characters.
vsscanf() Scan a buffer of characters, using va_list variable arguments.
scanf()   Scan characters from standard input. Not supported.
vscanf()   Scan characters from standard input, using va_list variable arguments.. Not supported.
fscanf()   Scan characters from a file. Not supported.
vfscanf()   Scan characters from a file, using va_list variable arguments.. Not supported.