M3S2 Part 2 Flashcards
are built-in or predefined data types and can
be used directly by the user to declare variables.
Primitive Data Types
Primitive data types available in C++ are:
Integer Double Floating Point
Character Valueless or Void
Boolean Wide Character
Floating Point
are used
with the built-in data types to
modify the length of data that a
particular data type can hold.
Datatype Modifiers
Data type modifiers available in
C++ are:
Signed
Unsigned
Short
Long
the data type used for storing (+/-) whole numbers
Integer 4 bytes
the data type used for storing characters
Character 1 byte
the data type used for storing logical values
Boolean
A
boolean variable can store either
true or false
the data type used for storing single precision floating
point values or decimal values
Floating Point 4 byte
the data type used for storing double
precision floating point values or decimal values.
Double Floating Point 8 byte
the data type that represents a valueless entity or without any value.
void
It is used for those function which does not returns a value.
void data type
this data type is also a character data type but this
data type has size greater than the normal 8-bit datatype.
Wide Character
2 or 4 bytes
wchar_t.
char name variable can store up to how many character inputs?
20
The other way to initialize variables is done by enclosing the initial value between parentheses ().
constructor initialization