c int long float double language other types of Bytes and outputs a (rpm)

16-bit compiler

char: 1 byte
char * (i.e. pointer variable): 2 bytes
short int: 2 byte
int: 2 byte
unsigned int: 2 bytes
float: 4-byte
double: 8 bytes
long: 4 bytes
long long: 8 byte
unsigned long: 4 bytes

The compiler 32 (see here on the line, with 16-bit machine, the comparison unit 64, in bold type is different, the rest is the same)

char: 1 byte
char * (i.e. pointer variable): 4 bytes (32-bit address space is 2 ^ 32, i.e., 32 'bit, i.e. 4 bytes Similarly compiler 64.) ( 16-bit machine, machine 32, the machine 64 varies)

short int: 2 byte
int: 4-byte (16-bit machine is 2B, 32 bit & 64 is 4B)
unsigned int: 4-byte (16-bit machine is 2B, 32 bit & 64 is 4B)

float: 4-byte
double: 8 bytes

long: 4 bytes (32-bit is 16-bit & 4B, 64 bits are 8B)
Long Long:. 8 byte
unsigned long: 4 bytes (32-bit is 16 & 4B, 64 bits are 8B)

64-bit compiler

char: 1 byte
char * (i.e. pointer variable): 8 bytes
short int: 2 byte
int: 4-byte
unsigned int: 4 bytes
float: 4 bytes
Double: 8 bytes
long: 8 bytes
long long: 8 byte
unsigned long: 8 bytes

% C output is a single-byte character

% F output is single-precision real

% D are decimal integers output

% E is the number of output implementation of scientific notation

% S output is a string

% G precision real number output of the dual

% Ld output is the number of long type

% Lld output is the number of long long type

% U output number is unsigned int

printf ( "%. 10lf \ n", f_a) 10 digits after the decimal point output, otherwise the default is 6 decimal places

type double output printlf ( "% lf", a);

For example: D = Double 123,456,789.12345;
the printf (. "2Lf%", D);

Output is 123456789.12, if not control of the decimal point, the output is 123,456,789.123450

Conclusion: The general form of the format control string:% [Modifier] conversion specifier, wherein the modifier is any option

Guess you like

Origin www.cnblogs.com/jaychan/p/11285900.html