What structure can execute a set of statements only under certain circumstances?

C plus plus else-if-then statements?

There is no else-if-then statement in any language. C++ uses the if/else if/else statement, where the first if is mandatory (introducing the statement) but the remaining clauses are optional. If present, the else clause must be the final clause, with one or more else if's in between, if required. Example: if( x ) { // ... statements to execute when x is non-zero } else { // ... statements to execute when x is zero } if( x==1 ) { // ... statements to execute when x is 1 } else if( y==1 ) { // ... statements to execute when x is not 1 but y is 1 } else { // ... statements to execute when neither x nor y are 1 }

1 Structure can execute a set of statements only under certain circumstancesDecision2 A __________ structure provides one alternative path of execution.

3 In pseudocode the if then statement is an example of decision structure

What structure can execute a set of statements only under certain circumstances?

4. A(n) __________ expression has a value of either true or false.

5. The symbols >,<, and == are all__________ operators.

6. A(n) __________ structure tests a condition and then takes one path if the condition is true, oranother path if the condition is false.

7. You use a(n) __________ statement in pseudocode to write a single alternative decision structure.

8. You use a(n) __________ statement in pseudocode to write a dual alternative decision structure.

9. A __________ structure allows you to test the value of a variable or an expression and then use thatvalue to determine which statement or set of statements to execute.

10. A(n) __________ section of a Select Case statement is branched to if none of the case values matchthe expression listed after the Select statement.

11. AND, OR, and NOT are __________ operators.

12. A compound Boolean expression created with the __________ operator is true only if both of itssubexpressions are true.

Decision structure:

Decision structure executes a set of statements under certain conditions. It is also known as selection structure. The action is performed only when the condition exists and takes different action depending upon the state “True” or “False”.

Example for decision structure:

“if” statement:

“if” statement is used to make a decision structure, which permits the program to hold more than one path of execution.

  • The indented statement is executed only when the condition is “true”.
  • If the given condition is “false”, it skips the indented statements.

Syntax for “if” statement:

if condition:

indented_statement_block

Explanation for incorrect options:

Sequence:

Simplest form of control structure is the “sequence structure”. It is a group of statements that are executed in the order in which they appear.

Hence, the option “A” is wrong.

Circumstantial:

Circumstantial structure does not execute the statements under certain conditions.

Hence, option “B” is wrong.

Boolean:

The Boolean expression evaluates the statement as either “True” or “False” with the help of “if” statement.

Hence, the option “D” is wrong.

What statements can execute a set of statements only under certain circumstances?

A decision (or selection) structure is a control structure that can execute a set of statements and perform a specific action only if a certain condition exists.

What is the structure that causes a statement or a set of statements to execute repeatedly?

A repetition structure causes a statement or set of statements to execute repeatedly. Repetition structures are used to perform the same task over and over. A condition-controlled loop uses a Boolean (true/false) condition to control the number of times that it repeats.

Which structure is a logical design that controls the order in which a set of statements executes?

A control structure is a logical design that controls the order in which a set of statements execute.

What is meant by the term conditionally executed?

6 CONDITIONAL EXECUTION. Conditional execution controls whether or not the core will execute an instruction. Most instructions have a condition attribute that determines if the core will execute it based on the setting of the condition flags.