Exam 5: Loops, Files, and Random Numbers

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

Incrementing a decrementing is so commonly done in programs that C# provides a set of simple unary operators designed just for incrementing a decrementing variables.

Free
(True/False)
4.8/5
(37)
Correct Answer:
Verified

True

You can use the StreamReader class's ____________ to determine if the file's read position is at the end of the file.

Free
(Multiple Choice)
4.8/5
(38)
Correct Answer:
Verified

C

The SaveFileDialog control has much in common with the OpenFileDialog control.

Free
(True/False)
4.7/5
(38)
Correct Answer:
Verified

True

In most circumstances you should avoid writing infinite loops.

(True/False)
4.8/5
(39)

A binary file may be opened and viewed in a text editor such as Notepad.

(True/False)
4.9/5
(33)

The ____________ allows the user to browse the system and select a location and name for a file that is about to be saved.

(Multiple Choice)
4.9/5
(39)

When reading numeric data from a text file, the Parse or TryParse families of methods can be used to convert the items from string values to numeric data types.

(True/False)
4.9/5
(28)

To create a Load event handler for a form, simply double-click any area of the form in the Designer window where there is no other control.

(True/False)
4.7/5
(37)

Not only may the counter variable of a for loop be initialized in the initialization expression, but it may also be declared there.

(True/False)
4.9/5
(40)

If the user clicks the Cancel button, the SaveFileDialog control's ShowDialog method returns the value ____________.

(Multiple Choice)
4.8/5
(41)

You can only add values of the string data type to a ListBox control.

(True/False)
4.8/5
(38)

The increment operator is ____________.

(Multiple Choice)
4.9/5
(34)

In order for a program to work with a file on the computer's disk, the program must create a file object in memory.

(True/False)
4.7/5
(33)

You can call a Random object's ____________ method to get a random floating-point number between 0.0 and 1.0.

(Multiple Choice)
4.8/5
(40)

You can use the StreamWriter class's ____________ to write a line of text to a file.

(Multiple Choice)
4.7/5
(40)

By indenting the statements in the body of the loop, you visually set the apart from the surrounding code.

(True/False)
4.9/5
(33)

When the user specifies a location and filename with the Save As dialog box, the file's path and filename are stored in the control's FilePath property.

(True/False)
4.8/5
(33)

The do-while loop always performs at least one iteration, even if its Boolean expression is false to begin with.

(True/False)
4.8/5
(36)

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
(35)

If the user clicks the Open button, the OpenFileDialog control's ShowDialog method returns the value ____________.

(Multiple Choice)
4.8/5
(36)
Showing 1 - 20 of 109
close modal

Filters

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