4.Identify fundamental data types and their characteristics Flashcards

1
Q

Char

A

A variable that stores a single character, which could be a digit, letter, or symbol. Examples include ‘7’, ‘X’, and ‘#’.

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

String

A

A sequence of characters, like words or sentences. Examples include “Hello World,” “3.14,” and “555-1212.”

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

Integers or int

A

Whole numbers like -7, 23, or 65536. An integer data type uses 1 to 8 bytes of computer storage. They don’t have a fraction or decimal place.

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

Floating-point numbers

A

: Numbers that can have decimal fractions, like 4.1, 26.4, or 5.62. A floating-point number (or just “float”) uses between 4 and 8 bytes of storage. A float can also store whole numbers (like 4.0). You use a float when you need more precision.

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

Fixed-point

A

Real numbers with a specific number of digits after the decimal point. They are common in financial calculations where accuracy is important, like $9.95.

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

Double

A

Similar to a float, but a double variable can store larger and more precise float numbers.

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

Boolean

A

Boolean operations follow a format similar to binary numbers, a system of one of two states. Their 1 or 0, however, represents either True or False.

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

And

A

If both conditions are TRUE, the whole statement is considered TRUE.

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

OR

A

If either condition is TRUE, the whole statement is also considered TRUE.

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

XOR

A

If one condition is TRUE and the other condition is FALSE, the whole statement is considered TRUE. If both conditions are TRUE, the whole statement is considered FALSE. In other words, if the conditions are different from each other, this Boolean operator sees the statement as correct. If the conditions are the same (either TRUE-TRUE or FALSE-FALSE), then the statement is incorrect.

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

NOT

A

The whole statement is not TRUE.

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

&& (Logical AND)

A

If both conditions are TRUE, the whole statement is TRUE.

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

|| (Logical OR

A

If either condition is TRUE, the whole statement is TRUE.

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

^ (Logical XOR)

A

If one condition is TRUE and the other condition is FALSE, the whole statement is considered TRUE. If both conditions are TRUE, the whole statement is considered FALSE.

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

! (Logical NOT

A

The whole statement is not TRUE.

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