Ovido
Language
  • English
  • Spanish
  • French
  • Portuguese
  • German
  • Italian
  • Dutch
  • Swedish
Text
  • Uppercase

User

  • Log in
  • Create account
  • Upgrade to Premium
Ovido
  • Home
  • Log in
  • Create account

c# chapter 6 part 2

A flag-controlled loop is also called a ____?

state=controlled loop

for (int outer = 0; outer < 2; outer++)
{

for (int inner = 0; inner < 3; inner++)

{

Console.WriteLine("Outer: {0}\tInner: {1}", outer, inner);

}

}



During the last iteration through the nested loop, what numbers are printed?

Outer: 1 Inner: 2

Which of the following is NOT a keyword used to enable unconditional transfer of control to a different program statement?

while

In order to use the MessageBox.Show( ) method in your console application, you must ____?

add a reference to the System.Windows.Forms.dll.

With counter controlled loops, it is important to think through and ____________ to ensure they have been taken into consideration. You should always check the initial and final values of the loop control variable and verify that you get the expected results at the boundaries?

check endpoints

Without incrementing the counter used in the conditional expression with counter controlled loops, the loop would go on indefinitely?

True

An off-by-one error is a common problem associated with counter-controlled loops where the loop body is performed one too many or one too few times.
True or False?

True

You must tell the user what value to type to end the loop for ____?

sentinel-controlled loops

A(n) ____________ is a loop that has no provisions for termination?

infinite loop

The for statement is a compact method of writing the loops that can be written using while; it packages together the ____________, test, and update all on one line?

initialization

If a numeric variable is being changed by a consistent amount with each iteration through the loop, the while statement is the best choice of loop constructs?
True or False?

False

____________ loops are often used for inputting data when you do not know the exact number of values to be entered?

Sentinel-controlled

The do...while loop can be used to implement a counter-controlled, sentinel-controlled, or state-controlled loop?
True or False?

True

The ___________ loop structure, which restricts access to read-only, is used to iterate or move through a collection, such as an array?

foreach

With nested loops, the outermost loop is always totally completed before the innermost loop is executed?
True or False?

False

Unlike the sentinel-controlled loop, the variable used with a state-controlled loop differs from the variable used to store the data that is being processed?
True or False?

True

A restriction on using the foreach statement is that you cannot change values in the collection. The access to the elements is read-only?
True or False?

True

When one of the program statement included within the body of a loop is another loop, a(n) ____________ loop is created?

nested

A state-controlled loop should be designed when you know the number of times the statements must be executed?
True or False?

False

The while statement is the only type of loop construct that can be used to develop a sentinel-controlled loop?
True or False?

False

The while statement is the only type of loop construct that can be used to develop a sentinel-controlled loop?
True or False?

True

The _____________ method of the MessageBox class displays a predefined dialog box that can contain text, captions for the title bar, special buttons, and icons?

Show( ) or Show

The do...while statement is a posttest loop, which means that the conditional expression is tested before any of the statements in the body of the loop are performed?
True or False?

False

With while loops, if the conditional expression evaluates to true, the body of the loop is not performed; control transfers to the statements following the loop?
True or False?

False

Iteration is a technique used where a method calls itself repeatedly until it arrives at the solution?
True or False?

False

Quiz
c# chapter 6 part 1
java chapter 14 part 3
java chapter 14 part 2
angie
java chapter 14 part 1
java chapter 13 part 2
java chapter 13 part 1
java chapter 12 part 2
java chapter 12 part 1
java 2 chapter 11 part 2
java 2 chapter 11 part 1
21st Reviewer
ANAT actions + trajet
UE4
UE4
UE4
Tyska glosor
Elektromagnatism begrepp
prov kapitel 1!
Avicultura
pompeo e crasso
interrogativos
concetti fondamentali del codice civile
Diritto privato
christmas memory verse.
PSP, Les Anxiolytiques
surfer girl
Kemins grunder
PR2 REVIEWER
ue3
Clara
Duits Schritt 50
UCSP REVIEWER
Ausiàs March
russo 1
Verbi
statistica
german 32
IWBRS
GW
Lengua temas 3 y 13
respiratory system
Ordi Pedia
Guess That Quote!
IPHP REVIEWER
salud 2 periosod2
so
brunelleschi
CFRR
thermoregulation (emily)