Exam 5: Loops, Files, and Random Numbers
Exam 1: Introduction to Computers and Programming161 Questions
Exam 2: Introduction to Visual C#131 Questions
Exam 3: Processing Data176 Questions
Exam 4: Making Decisions78 Questions
Exam 5: Loops, Files, and Random Numbers112 Questions
Exam 6: Modularizing Your Code with Methods69 Questions
Exam 7: Arrays and Lists99 Questions
Exam 8: More About Processing Data90 Questions
Exam 9: Classes and Multiform Projects89 Questions
Exam 10: Inheritance and Polymorphism37 Questions
Exam 11: Databases69 Questions
Select questions type
You can use the WriteLine or Write methods from the StreamReader class to write numbers to a text file, but the numbers are converted to strings.
(True/False)
4.9/5
(85)
To add an item to a ListBox control with code, you call the control's ____________method.
(Multiple Choice)
4.9/5
(71)
In the header of a for loop, which expression should not end with a semicolon?
(Multiple Choice)
4.8/5
(95)
If a loop does not have a way of stopping, it is called a(n) ____________.
(Multiple Choice)
4.9/5
(83)
In general, there are three types of files: text, binary, and bitmap.
(True/False)
4.8/5
(74)
____________ are commonly used to control the number of times a loop iterates.
(Multiple Choice)
4.9/5
(71)
The second expression appearing in the header of a for loop is the _____________, which is a Boolean expression that determines whether the loop will repeat.
(Multiple Choice)
4.8/5
(78)
If a Random object uses the same seed value each time it is created, it always generates the same series of random numbers.
(True/False)
4.8/5
(86)
You can specify the directory to be initially displayed by the Open dialog box by storing its path in the ____________.
(Multiple Choice)
4.7/5
(100)
Most programming languages provide two different ways to access data stored in a file: sequential access and direct access.
(True/False)
4.7/5
(76)
A file's ____________ marks the location of the next item that will be read from the file.
(Multiple Choice)
4.8/5
(84)
You can change the default text displayed in the Save As dialog box's title bar by changing the SaveFileDialog control's DisplayText property.
(True/False)
4.7/5
(75)
If you call Random.Next( ), the resulting random values will be between 1 and 2,147,483,647.
(True/False)
4.8/5
(93)
The expression ____________ causes an object of the Random class to be created in memory.
(Multiple Choice)
4.7/5
(67)
In code, you can display a Save As dialog box by calling the SaveFileDialog control's ____________ method.
(Multiple Choice)
4.9/5
(71)
If the user clicks the Cancel button, the SaveFileDialog control's ShowDialog method returns the value ____________.
(Multiple Choice)
4.8/5
(87)
In order to write data to a text file, you must create a file object using the ____________.
(Multiple Choice)
5.0/5
(91)
You can use the StreamWriter class's ____________ method to write a line of text to a file.
(Multiple Choice)
4.9/5
(83)
In the update expression of a for loop, you must use the ++ operator in the increment expression.
(True/False)
4.9/5
(77)
Showing 81 - 100 of 112
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)