Exam 6: Repeating Instructions

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

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.

Free
(True/False)
5.0/5
(81)
Correct Answer:
Verified

False

The loop control structure used to move through a collection (group of data items)that does not require you to increment a loop control variable or test the expression to determine when all data has been processed is the ____ statement.

Free
(Multiple Choice)
4.9/5
(92)
Correct Answer:
Verified

D

The only posttest loop structure available in C# is _____.

Free
(Multiple Choice)
4.7/5
(73)
Correct Answer:
Verified

C

One of the major strengths of programming languages can be attributed to loops.

(True/False)
4.8/5
(87)

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

(Short Answer)
4.7/5
(101)

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

(True/False)
4.7/5
(66)

What is a requirement of the sentinel-controlled loop shared by counter-controlled loops?

(Multiple Choice)
4.7/5
(96)

An advantage of sentinel-controlled loops is you do not need to know how many times the loop will be performed.

(True/False)
4.9/5
(77)

int sum = 0; int number = 0; while (number < 10) { sum = sum + number; Console.WriteLine(sum); } The statement above prints the values of 0 through 9 on separate lines.

(True/False)
4.8/5
(72)

Iteration is a technique used where a method calls itself repeatedly until it arrives at the solution.

(True/False)
4.7/5
(83)

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

(True/False)
4.7/5
(83)

When you know the number of times the statements must be executed,create a(n)____________ loop.

(Short Answer)
4.9/5
(89)

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/False)
5.0/5
(77)

In order to write a recursive solution ____.

(Multiple Choice)
4.9/5
(75)

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

(Short Answer)
5.0/5
(66)

The event-driven model used to create Windows applications ____.

(Multiple Choice)
4.9/5
(80)

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

(Short Answer)
5.0/5
(84)

if (int.TryParse(inStringValue,out integerValue)== false) Console.WriteLine("Invalid input - 0 recorded for end value"); If a character such as "b" is entered by the user and stored in inStringValue,TryParse( ) returns ____________.

(True/False)
4.8/5
(81)

In C# curly braces must be added to surround all loop bodies.

(True/False)
4.7/5
(71)

A flag-controlled loop is also called a ____.

(Multiple Choice)
4.7/5
(77)
Showing 1 - 20 of 75
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)