Programming-Chapter 3(1) Flashcards

Processing data

1
Q

Variable

A

refers to a memory location used to store values

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

String

A

Is used for combinations of characters, such as names, phone numbers and ID numbers

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

Numeric literals

A

numbers that are written into the programs code

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

Variable rules

A

Declare a variable before using it
You can only assign a value to a variable if the value is compatible with the variables’ data type
Always ensure that a variable is either initialized or gets a value at some point

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

Local variables

A

Variables that are declared inside a method(event handler) are called local variables
They only belong to that method
Only statements inside the method can access the variable

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

Scope

A

refers to the part of a program in which a variable can be accessed

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

A variables lifetime

A

Is the time period during which the variable exists in memory while the program is running

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

Concatenation

A

Joins two strings together, can also happen with another data type

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