Below is a list of the Data Types definition.
INTEGER ( INT ) - All numeric items with no fractional part belong to integer type
Three (3) Integer Modifiers
- Unsigned Int : It can store positive range of values
- Short Int : It can store a limited range values
- Long Int : It can store high values and negative values
FLOAT - all numeric data including fractional part
CHARACTER ( CHAR ) - all single characters used in the programs belong to the character type
DOUBLE - the higher precision of floating point
STRING - a sequence or set of characters including blank space
BOOLEAN - represents the values : TRUE or FALSE
Although only two values are possible, they are rarely implemented as a single binary digit for efficiency reasons.
My Blog List
Sunday, September 7, 2014
Saturday, September 6, 2014
FUNDAMENTAL DATA TYPES
- A
data type simply means a type or category of data. The way a particular value
is represented in memory is determined by its data type.
- Refer to the classes of data that can be manipulated by C++ programs.
Data Types
- Numerical Integer Type (int)
- Character Type (char)
- Boolean Type (bool)
- Floating
- Double
- String
Summary of the Basic Fundamental Data Types in C++
References : http://www.cplusplus.com/
Variables and Data Types with sample Programs
Friday, September 5, 2014
Variables - a portion of memory to store a determined value.
Identifiers - are used as names for variables and other items in a C++ program.
Valid Identifiers - is a sequence of one or more letters, digits or underscores characters. Neither spaces nor punctuation marks or symbols can be an identifiers.
You have to consider when inventing your own identifiers is that they cannot match any of the reserved keywords of the C++ language nor your compilers specific ones, which are reserved keywords.
Identifiers - are used as names for variables and other items in a C++ program.
Valid Identifiers - is a sequence of one or more letters, digits or underscores characters. Neither spaces nor punctuation marks or symbols can be an identifiers.
You have to consider when inventing your own identifiers is that they cannot match any of the reserved keywords of the C++ language nor your compilers specific ones, which are reserved keywords.
The
standard reserved keywords are:
asm,
auto, bool, break, case, catch, char, class, const, const_cast, continue,
default, delete, do, double, dynamic_cast, else, enum, explicit, export,
extern, false, float, for, friend, goto,
if,
inline, int, long, mutable, namespace, new, operator, private, protected,
public, register,
reinterpret_cast,
return, short, signed, sizeof, static, static_cast, struct, switch, template,
this,
throw, true, try, typedef, typeid, typename, union, unsigned, using, virtual,
void, volatile, wchar_t, while
Alternative
representations for some operators cannot be used as identifiers since they are
reserved words under some circumstances:
and,
and_eq, bitand, bitor, compl, not, not_eq, or, or_eq, xor, xor_eq
Subscribe to:
Posts (Atom)