PRIMITIVE DATA TYPE
Primitive data types are data types which are not defined with support of other data types.
Some of the primitive data types are:
1. Numeric types
2. Boolean types
3. Character types
- Numeric Types: These are the numbers.
- Integer: A data type that represents some range of mathematical integers. Different programming languages supports different size of integers. For example,
- Java includes four signed integer sizes: byte, short, int, and long.
- C++ and C#, include unsigned integer types (value without sign).
- int age = 20;
- Floating-Point: Floating-point data types model real numbers. Most languages include two floating-point types, often called float and double.
- Float type is the standard size, usually being stored in four bytes of memory.
- Double type is provided for situations where larger fractional parts and/or a larger range of exponents is needed.
- Precision is the accuracy of the fractional part of a value, measured as the number of bits.
- Range is a combination of the range of fractions and, more important, the range of exponents.
- Complex: Complex values are represented as ordered pairs of floating-point values. It contains a imaginary number. It includes operations for arithmetic on complex values.
For example, in Python, (8 + 2j), contains j as imaginary number. - Decimal: Decimal data types store a fixed number of decimal digits. For example, the number 0.1.
- Boolean Types: It has only two elements, true and false. Boolean types are often used to represent switches or flags in programs.
- Character Types: It stores a single character and requires a single byte of memory in almost all compilers.
The collection of values that can be represented by a floating-point type is defined in terms of precision and range.
What I liked about them were their humble beginnings they were human, once, and so you knew that they just got it in a way Jesus never would cialis vs viagra