Lecture 5 Flashcards

1
Q

While loop

A

Loop that repeats while the conditional is met.

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

Do while loop

A

The do statement proceeds the command and the while and conditional appear at the end of the command. This executes the commands once before checking the conditional.

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

Sentinel

A

A special value that tells the loop to end

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

Casting a value

A

Changing a variable to another type can be formated in two ways:
(type)variable
Type(variable)

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

For loop

A

Conditional contains intilization, conditional, and update/iteration separated by a semicolon.

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

Variable scope

A

Place where the variable exists. Only exists within the curly braces it was declared in.

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

Static variable

A

Goes before the variable type. Makes the variable last through all iterations of a loop but not after the loop breaks.

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