Chapter 3 Flashcards

1
Q

Define an algorithm

A

An algorithm is a precise sequence of steps to produce a result.

A program is an encoding of an algorithm in a language to solve a particular problem.

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

Define a value

A

A value is a data item that is manipulated by the computer.

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

Define a variable or identifier

A

A variable or identifier is the name that the programmer uses to refer to a location in memory.

catbox

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

Define datatype

A

A datatype is the type of data stored at a location in memory.

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

Define location

A

A location has an address in memory and stores a value.

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

IMPORTANT: The value at a given location in memory (named using a variable name) can change using

A

IMPORTANT: The value at a given location in memory (named using a variable name) can change using

initialization or assignment.

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

IMPORTANT: The value at a given location in memory (named using a variable name) can change using

A

IMPORTANT: The value at a given location in memory (named using a variable name) can change using

initialization or assignment.

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

Syntax that represents permanent data that doesn’t change.

A

named constant

final datatype CONSTANTNAME = VALUE;

final double PI = 3.14159;
final int SIZE = 3;

CONSTANTNAME = CAPS

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

Byte

A

(-128 to 127)

8 bit range

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

short

A

16 bit range

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

long

A

64 bit signed

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

float

A

32-bit less precise

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

double

A

64 bit more precise

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