Zookeeper
You can use sizefo to obtain the number of bytes used by the data type.
Syntax: 1. sizeof (data type variable name); 2. sizeof (data type );
# Include <stdio. h>
Void main ()
{
// Character type
Char chartype = 'C ';
// The siezeof data type can be used to obtain the data size of this type.
Printf ("char type length: % d \ n", sizeof (char ));
Short primitive type = 3;
// You can use sizeof to obtain the data size of this type.
Printf ("Short Type length: % d \ n", sizeof (short ));
Int inttype = 45;
// You can use sizeof to obtain the data size of this type;
Printf ("the length of the int type is % d \ n", sizeof (INT ));
Long longtypes = 234;
// You can also obtain the size of this data by using sizeof (variable name method ).
Printf ("the length of the long type is % d \ n", sizeof (longtype ));
Float floattypes = 3.14;
Printf ("Float Type length: % d \ n", sizeof (float ));
Double doubletype = 234.12345;
Printf ("the length of the double type is % d \ n", sizeof (doubletype ));
Longlong fig = 123456;
Printf ("the length of the long type is % d \ n", sizeof (Longlong ));
Getchar ();
}
: