C examples for Language Basics:scanf
Conversion Specifier | Meaning |
---|---|
%c | Read as a character. |
%d | Read as a signed decimal integer. |
%e , %f , %g , %a | Read as a floating-point number ( %a is C99). |
%E , %F , %G , %A | Read as a floating-point number ( %A is C99). |
%i | Read as a signed decimal integer. |
%o | Read as a signed octal integer. |
%p | Read as a pointer (an address). |
%s | Read as a string. Input begins with the first non-whitespace character and includes everything up to the next whitespace character. |
%u | Read as an unsigned decimal integer. |
%x , %X | Read as a signed hexadecimal integer. |