Data Types and Structures i - Primitive Data Types Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is an integer? Give 1 example.

A

A whole number with no decimal places. (E.G. 1, 2, -1, 10)

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

What is a float? Give 1 example

A

(a.k.a. Real). A numeric value which contains decimal numbers. (E.G. 4.5, 1/2)

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

What is a Boolean piece of data? Give 2 examples

A

Hold one of two values. (E.G. (yes / no), (true / false))

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

What is a character? Give 1 example

A

A single character. (E.G. ‘a’, ‘B’, ‘7’ ‘/’)

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

What is a string? Give 1 example

A

A collection of characters including text, numbers, symbols, new lines and spaces. (E.G. “Manny is gay ;)”)

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

What is ASCII?

A

American Standard Code for Information Interchange. A set of digital codes representing letters, numerals, and other symbols, widely used as a standard format in the transfer of text between computers.

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

What is parity?

A

A function whose being even (or odd) provides and check on a set of binary values.

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

Why is parity used?

A

The same parity function is used by both the sender and receiver of the data (either odd or even) and so it can be used for error detection in the data. For example, if two computers are using even parity and receive an ASCII value containing an odd amount of 1s then it can be assumed there was an error and ask for retransmission.

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