Selection Structures Flashcards

1
Q

choosing between two or more alternative actions.

A

selection

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

an expression that evaluates to either true or false.

A

Boolean expression

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

When boolean expressions are formed they must set up a relationship between items in the expression. This relationship is set up using a set of operators called the _________________.

A

relational operators.

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

(=)

A

assignment operator

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

(==)

A

relational operator

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

combines two logical expressions and requires that both expressions be TRUE for the entire expression to be TRUE.

A

AND ( && )

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

combines two logical expressions and states that if either or both of the expressions are TRUE, the entire expression is TRUE

A

OR ( || )

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

precedes a single expression and gives its opposite as the result.

A

NOT (!)

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

GENERAL FORM:

if(Boolean Expression)
{
	//Executable Statements
				⋮
}
A

If statement

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

GENERAL FORM:

if(Boolean Expression)
{
	//Statement1
				⋮
}
else{
	//Statement2
				⋮
}
A

If-else statement

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

GENERAL FORM:

switch (IntegralExpression)
{
	//SwitchLabel…statement; 	
					⋮
} GENERAL FORM FOR SWITCHLABEL IS

case ConstantExpression:

default:
A

Switch-case statement

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