Command: scanf, fscanf, sscanf
Syntax: % *, field_width, modifier, conversion_character
*:
* Indicates that the conversion should take place, but the result should
not be stored in the variable specified.
Field Width:
Defines maximum input field width.
Modifier:
This will be on of:
· 'h' - For 'd','i','n','o','u','x' argument is pointer to short int.
· 'l' - For 'd','i','n','o','u','x' argument is pointer to long int.
· 'l' - For 'e','f','g' argument is pointer to double.
· 'L' - For 'e','f','g' argument is pointer to long double.
Conversion Character:
· 'd' - Decimal integer.
· 'i' - A decimal, octal or hex integer.
· 'o' - Octal integer.
· 'u' - Unsigned decimal integer.
· 'x' - Hex integer.
· 'e','f','g' - Floating point number.
· 's' - Non white-space chars. Null terminated.
· 'c' - Sequence of chars (length specified).
· 'p' - Pointer value.
· 'n' - Number of chars read so far.
|
|
|