Q2 L3 - Data Types Flashcards
data type
type of the data being processed in the program
main classification of data types
numeric data & non-numeric data
numeric data
These types are used to perform mathematical operations like Addition, Subtraction, etc.
non-numeric data
These are the data that can’t be manipulated by arithmetic operators.
How many types of numeric data are there? (given by ma’am)
Seven
Variables with this data type can store values from 0 to 255.
Byte
Default value of byte
0
One of the frequently used data types. They accept both positive
values, negative values, and zero as well.
Integer / Short Integer
This is an alternative to an integer data type which also stores
a whole integer value.
Long
How much memory does a long occupy?
4 bytes
This is an exact numeric data type that is used for its precision.
Decimal
The smallest non-zero value accepted is +/- what?
0.0000000000000000000000000001 (27 0’s in decimal places, with one 1.)
The accepted range of values are:
- 402823E38 to -1.401298E-45 for negative values
- 401298E-45 to 3.402823E38 for positive values.
Single
The accepted range of values are:
-1.79769313486231E308 to -4.94065645841247E-324
for negative values 4.94065645841247E-324 to
1.79769313486232E308 for positive values
Double
These are useful for monetary calculations.
Currency