MicrOS
scanf.c File Reference
#include <stdarg.h>
#include "../stdio.h"

Functions

int scanf (const char *format,...)
 Read formatted data from stdin. More...
 

Function Documentation

◆ scanf()

int scanf ( const char *  format,
  ... 
)

Read formatted data from stdin.

Reads data from stdin and stores them according to the parameter format into the locations pointed by the additional arguments.

Parameters
formatC string that contains the text to be written to the stream.Can contain embedded format specifiers.
...Depending on the format string, the function may expect a sequence of additional arguments, each containing a pointer to allocated storage where the interpretation of the extracted characters is stored with the appropriate type.
Returns
On success, the function returns the number of items of the argument list successfully filled. Otherwise, EOF.