1. (TCO 5) When writing a program, if you know that statements in a loop must execute at least once, use the _____ structure.
2. (TCO 5) When used within a loop structure, the _____ statement causes execution to jump out of the loop and proceed with subsequent statements in the program
3. (TCO 5) The _____ looping structure tests its conditional expression before the statements it contains execute, whereas the _____ looping structure tests it afterward
4. (TCO 10) During a code walk-through, someone may suggest that this code be replaced with _____, as it is more efficient.
int val = 0;
while (val < 10)
{
Console.WriteLine(val);
val++;
5. (TCO 5) A block of statements within the body of a WHILE loop must be surrounded with
6. (TCO 5) What output will this set of statements produce?
int a = 1;
while (a > 1)
{
Console.Write("{0}\t", a);
a--;
}
Console.Write("{0}\t", a);
7. (TCO 5) In this code, the variable _____ is a counter and the variable _____ is an accumulator.
double total = 0, weight = 2.0, limit =10, max = 50;
int track = 0;
for (int num = 0; num
Comments
Content
1. (TCO 5) When writing a program, if you know that statements in a loop must execute at least once, use the _____ structure.
2. (TCO 5) When used within a loop structure, the _____ statement causes execution to jump out of the loop and proceed with subsequent statements in the program
3. (TCO 5) The _____ looping structure tests its conditional expression before the statements it contains execute, whereas the _____ looping structure tests it afterward
4. (TCO 10) During a code walk-through, someone may suggest that this code be replaced with _____, as it is more efficient.
int val = 0;
while (val < 10)
{
Console.WriteLine(val);
val++;
5. (TCO 5) A block of statements within the body of a WHILE loop must be surrounded with
6. (TCO 5) What output will this set of statements produce?
int a = 1;
while (a > 1)
{
Console.Write("{0}\t", a);
a--;
}
Console.Write("{0}\t", a);
7. (TCO 5) In this code, the variable _____ is a counter and the variable _____ is an accumulator.
double total = 0, weight = 2.0, limit =10, max = 50;
int track = 0;
for (int num = 0; num