Exam 6: Repeating Instructions
Exam 1: Introduction to Computing and Programming75 Questions
Exam 2: Data Types and Expressions75 Questions
Exam 3: Methods and Behaviors75 Questions
Exam 4: Creating Your Own Classes75 Questions
Exam 5: Making Decisions75 Questions
Exam 6: Repeating Instructions75 Questions
Exam 7: Arrays75 Questions
Exam 8: Advanced Collections75 Questions
Exam 9: Introduction to Windows Programming75 Questions
Exam 10: Programming Based on Events74 Questions
Exam 11: Advanced Object-Oriented Programming Features75 Questions
Exam 12: Debugging and Handling Exceptions75 Questions
Exam 13: Working with Files75 Questions
Exam 14: Working with Databases75 Questions
Exam 15: Web-Based Applications75 Questions
Select questions type
int counter = 0;
while (counter < 100)
{
Console.WriteLine(counter);
counter++;
}
-The first value printed with the program segment above is ____.
(Multiple Choice)
4.8/5
(86)
int counter = 0;
while (counter < 100)
{
Console.WriteLine(counter);
counter++;
}
-A method that calls itself repeatedly until it arrives at the solution is a(n)____method.
(Multiple Choice)
4.8/5
(90)
The ____________ statement is a pretest form of loop which is considered a specialized form of the while statement and is usually associated with counter-controlled types of loops;
(Short Answer)
4.8/5
(66)
int sum = 0;
int number = 1;
while (number < 100)
{
sum = sum + number;
}
The program statements above produce an infinite loop.
(True/False)
4.9/5
(81)
s = num.Next(7);
The statement above produces seven random numbers.
(True/False)
4.9/5
(88)
for (int i = 0; i < 5; i++)
Console.Write(i + "\t");
-Given the code snippet above,how many times will the loop body be executed?
(Multiple Choice)
5.0/5
(85)
for (int i = 0;i < 10;i++) {
Console.WriteLine("counter " + i);
}
The variable i defined in the program segment above ____.
(Multiple Choice)
4.8/5
(75)
The sentinel value is used as the operand in the conditional expression for an indefinite loop.
(True/False)
4.9/5
(80)
A sentinel value is a(n)____________.It is a value that should not be processed.
(Short Answer)
4.8/5
(76)
A common problem associated with counter-controlled loops is not executing the loop for the last value.This type of problem is labeled a(n)____ error.
(Multiple Choice)
4.8/5
(95)
____________ loops are often used for inputting data when you do not know the exact number of values to be entered.
(Short Answer)
4.8/5
(80)
With nested loops,the outermost loop is always totally completed before the innermost loop is executed.
(True/False)
4.9/5
(92)
C# performs automatic garbage collection once the loop is finished and releases any variables declared as part of the loop.
(True/False)
4.8/5
(81)
In order to use the MessageBox.Show( )method in your console application,you must ____.
(Multiple Choice)
4.9/5
(91)
The do...while loop can be used to implement a counter-controlled,sentinel-controlled,or state-controlled loop.
(True/False)
4.7/5
(81)
Showing 61 - 75 of 75
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)