Page 16 - Modular_V1.1_Flipbook
P. 16
Following are the keywords of C++:
auto and break bool case catch char
continue class const do double default delete
else enum export explicit friend extern for
float false goto if int inline long
mutable not new namespace or public private
protected return switch short static signed sizeof
struct this template try throw true union
unsigned using virtual void volatile while xor
Data Types
A data type specifies the type of value a variable can contain. For example, a person’s name must
be stored as a string value whereas the person’s age must be stored as an integer. Data types in
C++ are:
Data Types in C++
Primitive Non-Primitive
int char float double bool void class struct enum union
Primitive Data Types
Primitive data types are built-in or default data types. User can directly use these data types to
declare variables. Following table shows the primitive data types with their size and range:
Data Type Size (in bytes) Range
short int 2 -32,768 to 32,767
unsigned short int 2 0 to 65,535
unsigned int 4 0 to 4,294,967,295
int 4 -2,147,483,648 to 2,147,483,647
long int 8 -2,147,483,648 to 2,147,483,647
unsigned long int 8 0 to 4,294,967,295
long long int 8 -(2^63) to (2^63)-1
unsigned long long int 8 0 to 18,446,744,073,709,551,615
signed char 1 -128 to 127
unsigned char 1 0 to 255
float 4 -3.40282e+38 to 3.40282e+38
double 8 -1.79769e+308 to 1.79769e+308
long double 12 3.3621e-4932 to 1.18973e+4932
14 Touchpad MODULAR (Version 1.1)-X

