0
Alien head

.NET Control Structure Quiz

Description: .NET Control Structure Quiz
Number of Questions: 10
Created by:
Tags: .net

The End If statement is required:

  1. in all If...Then statements.

  2. in all Multi-line statements with Else.

  3. in Single Line statements.

  4. Both a and b.

  5. All of the above.

Answer: 2

Which selection process is an example of multiple branches from a single expression?

  1. If...Then

  2. Select Case

  3. Do...Loop

  4. For...Next

  5. All of the above.

Answer: 2

How many times is the test expression of a Select Case evaluated?

  1. 1

  2. 2

  3. Once for each Case.

  4. It depends on the value of the test expression.

Answer: 1

Which is not a type of Select Case test construct?

  1. simple value

  2. complex value

  3. relational value with Is

  4. range of values with To

  5. All of the above are types of test constructs.

Answer: 2

What happens in a Select Case construct when a test value matches the test expression?

  1. The corresponding block of statements is run.

  2. The next Case test value is checked.

  3. The Case Else statement is run.

  4. The Select Case construct is exited.

  5. An error is generated.

Answer: 1

Do...Loop is an iterative statement because it:

  1. selects a block of statements to run.

  2. runs the same block of statements repeatedly.

  3. selects a block of statements and runs it repeatedly.

  4. selects a block of statements and runs it a specified number of times.

  5. All of the above.

Answer: 2

Which is true of a Do...Loop?

  1. The While condition goes after the Do keyword.

  2. The Until condition goes after the Do keyword.

  3. The While condition goes after the Loop keyword.

  4. The Until condition goes after the Loop keyword.

  5. All of the above.

Answer: 5

Which Do...Loop statement should be used to process test scores where a test score over 100 is a signal to stop the processing?

  1. Do While Score > 100

  2. Do Until Score > 100

  3. Loop While Score > 100

  4. Loop Until Score > 100

  5. All of the above are valid for this situation.

Answer: 2

In the For...Next statement the default value for the Step is:

  1. -1

  2. 1

  3. 2

  4. There is no default for the step value.

Answer: 2

The For...Next Loop is used when:

  1. a choice is made based on a Boolean condition.

  2. a block of statements is executed an unknown number of times.

  3. a block of statements is executed a known number of times.

  4. Both a and b.

  5. All of the above.

Answer: 3
+ View questions