Q2 L3 - Data Types Flashcards

1
Q

data type

A

type of the data being processed in the program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

main classification of data types

A

numeric data & non-numeric data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

numeric data

A

These types are used to perform mathematical operations like Addition, Subtraction, etc.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

non-numeric data

A

These are the data that can’t be manipulated by arithmetic operators.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How many types of numeric data are there? (given by ma’am)

A

Seven

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Variables with this data type can store values from 0 to 255.

A

Byte

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Default value of byte

A

0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

One of the frequently used data types. They accept both positive
values, negative values, and zero as well.

A

Integer / Short Integer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

This is an alternative to an integer data type which also stores
a whole integer value.

A

Long

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How much memory does a long occupy?

A

4 bytes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

This is an exact numeric data type that is used for its precision.

A

Decimal

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

The smallest non-zero value accepted is +/- what?

A

0.0000000000000000000000000001 (27 0’s in decimal places, with one 1.)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

The accepted range of values are:

  1. 402823E38 to -1.401298E-45 for negative values
  2. 401298E-45 to 3.402823E38 for positive values.
A

Single

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

The accepted range of values are:
-1.79769313486231E308 to -4.94065645841247E-324
for negative values 4.94065645841247E-324 to
1.79769313486232E308 for positive values

A

Double

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

These are useful for monetary calculations.

A

Currency

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How many digits and decimals to the left and right can a currency data type store?

A

15 digits to the left of the decimal and 4 digits to the right

17
Q

The types of numeric data.

A

a. byte
b. integer / short integer
c. long
d. decimal
e. single
f. double
g. currency

18
Q

This data type can store only 2 values i.e. TRUE or FALSE.

A

Booelan

19
Q

How much bytes of memory - boolean?

A

2 bytes

20
Q

TRUE or FALSE in numbers

A

1 or 0 respectively

21
Q

default value of boolean

A

false

22
Q

This data type is used to represent the date and time.

A

Date

23
Q

Date range values from?

A

Jan. 1 0100 to december 31 9999

24
Q

DATE data type - time variables of?

A

from 0:00:00 to 23:59:59

25
Q

storage size of DATE

A

8 bytes

26
Q

a sequence of characters.

A

string

27
Q

This data type is used to store a sequence of characters

A

string

28
Q

2 types of String data type

A
  1. variable-length string

2. fixed-length string

29
Q

This type occupies 10 bytes of storage size plus the memory required for the string that is the string length. They have a range value from 0 to approximately 2 billion.

A

Variable-length String

30
Q

It occupies the memory equal to the length of the string itself. It can range from 1 to approximately 65,400 characters

A

Fixed-length String

31
Q

Any reference (used for pictures and images)

A

Object

32
Q

This is the universal data type, it can accept any kind of data numeric and non-numeric. If you don’t mention a data type, it will treat that as this.

A

Variant

33
Q

variable

A

primary storage location, memory space allocated

34
Q

A program should consider the following in

allocating memory:

A
  1. How much space will the data consume?
  2. Where in the memory was each variable
    stored?
35
Q

9 RULES OF NAMING VARIABLES

A
  1. letter followed by alphanumeric
  2. no special characters
  3. must be unique
  4. indicative name of the value it holds
  5. zero and letter O
  6. underscore instead of space
  7. keep it short, can’t exceed 256 characters
  8. uppercase and lowercase letters are read differently.
  9. you shouldn’t use any names that are the same as the function, statement, method, and intrinsic constant names used in any host application.
36
Q

constant

A

do not chnage