filmov
tv
C Language Lesson 13 Format specifiers 1

Показать описание
We need format specifiers to display values of expressions or variables. Every variable has its specific format. Here some of these format specifiers.
Format Specifier Type
-------------------- ---------
%c Character
%d Signed integer
%e or %E Scientific notation o floats
%f Float values
%g or %G Similar as %e or %E
%hi Signed integer (short)
%hu Unsigned integer (short)
%i integer
%l or %ld or %li Long integer
%lf Double
%Lf Long double
%lu Unsigned int or unsigned long
%lli or %lld Long long
%llu Unsigned long long
%o Octal representation
%p Pointer
%s String
%u Unsigned int
%x or %X Hexadecimal representation
%% Prints % character
Format Specifier Type
-------------------- ---------
%c Character
%d Signed integer
%e or %E Scientific notation o floats
%f Float values
%g or %G Similar as %e or %E
%hi Signed integer (short)
%hu Unsigned integer (short)
%i integer
%l or %ld or %li Long integer
%lf Double
%Lf Long double
%lu Unsigned int or unsigned long
%lli or %lld Long long
%llu Unsigned long long
%o Octal representation
%p Pointer
%s String
%u Unsigned int
%x or %X Hexadecimal representation
%% Prints % character