previous | start | next

The C sscanf Function

The sscanf function is just like the scanf function except that it reads from a string rather than from standard input.

The first parameter is the string to read from.

This function is often used in conjuction with gets (or fgets).

First gets reads an entire line into a C-string (that is, into a char array that is null terminated).

Then sscanf extracts data from the string.



previous | start | next