C# [ch 5]

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

What keyword(s) should you use to initiate a for-loop in C#?

for

What are the block of statements that are executed in a loop considered to be part of?

loop body

What technique can be used to combine two different loops into one?

loop fusion

What should an accumulator variable be set to before it is used to accumulate a total?

0

Many loop control variable values rely on an added value through each loop. What type of loop control variable is this?

An incrementing loop control variable

What is any single execution of a loop referred to as?

An iteration of the loop

After executing your GUI program, you realize that your code has created an infinite loop. How can you break free of the loop in your GUI program?

Close the Frame that hosts the application

A bug has resulted in your program executing an infinite loop. What key can be pressed in conjunction with the C or Break (Pause) key to escape the loop?

Ctrl

What is a garbage value in the C# programming language?

It is an unknown, unassigned value

Why do event-driven GUI programs sometimes require fewer coded loops than their counterpart console applications?

Some events are determined by the user's actions when the program is running

You are writing a program that defines a variable within a loop, and then tries to use that variable outside the loop. However, the program does not run as intended. What is the issue?

The variable is limited to the scope of the loop

Totals that are summed one at a time in a loop are known as what type of totals?

accumulated

Loops that are controlled by reducing a variable are utilizing what type of loop control variable?

decrementing

A loop for which the number of iterations is predetermined is known as what type of loop?

definite

What type of loop checks a Boolean expression at the "bottom" of the loop after each repetition has occurred?

do

What type of loop allows you to indicate the starting value for the loop control variable, the test condition that controls loop entry, and the expression that alters the loop control variable, all in one convenient place?

for

A loop that is controlled by user input rather than altered by arithmetic is known as what type of loop?

indefinite

When using nested loops, what loop is contained entirely within an outer loop?

inner loop

When using a nested loop, what should always be thought of as the all-encompassing loop?

outer loop

What type of loop is one in which the loop control variable is tested after the loop body executes?

posttest

Unlike the while and for loops, the do loop is considered to be in what category of loops?

posttest loops

Both the while loop and for loops are considered to be in what category of loops?

pretest loops

A value such as a 'Y' or 'N' that must be supplied in order to stop a loop is known as what type of value?

sentinel value

The expressions in each part of an AND or OR expression are evaluated only as much as necessary to determine whether the entire expression is true or false. What type of evaluation is this?

short-circuit

What type of loop checks a Boolean expression at the "top" of the loop before the body has a chance to execute?

while


Set pelajaran terkait

Ch. 4: Equilibrium: Where Supply Meets Demand

View Set

Chapter 54- Drug Therapy for Anxiety and Insomnia

View Set

Ch. 8 Testbank, Plagiarism & Intellectual Property

View Set