Filters
Question type

Study Flashcards

A file's ____________ marks the location of the next item that will be read from the file.


A) line marker
B) index value
C) read position
D) newline character

E) B) and D)
F) B) and C)

Correct Answer

verifed

verified

If a Random object uses the same seed value each time it is created, it always generates the same series of random numbers.

A) True
B) False

Correct Answer

verifed

verified

If you call Random.Next( ), the resulting random values will be between 1 and 2,147,483,647.

A) True
B) False

Correct Answer

verifed

verified

Most programming languages provide two different ways to access data stored in a file: sequential access and direct access.

A) True
B) False

Correct Answer

verifed

verified

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.


A) test expression
B) update expression
C) initialization expression
D) control expression

E) B) and D)
F) C) and D)

Correct Answer

verifed

verified

In the header of a for loop, which expression should not end with a semicolon?


A) initialization expression
B) test expression
C) update expression
D) none of these

E) B) and C)
F) All of the above

Correct Answer

verifed

verified

If a loop does not have a way of stopping, it is called a(n) ____________.


A) runaway loop
B) game loop
C) infinite loop
D) expressionless loop

E) A) and C)
F) A) and D)

Correct Answer

verifed

verified

____________ are commonly used to control the number of times a loop iterates.


A) Boolean variables
B) Sentinel variables
C) Counter variables
D) Named constants

E) A) and B)
F) A) and C)

Correct Answer

verifed

verified

The expression ____________ causes an object of the Random class to be created in memory.


A) GetRandom(int)
B) GenerateRandom(number)
C) new Random()
D) random new()

E) A) and C)
F) C) and D)

Correct Answer

verifed

verified

You can specify the directory to be initially displayed by the Open dialog box by storing its path in the ____________.


A) InitialDirectory property
B) Source property
C) Filename property
D) Path property

E) A) and D)
F) A) and B)

Correct Answer

verifed

verified

The increment operator is ____________.


A) --
B) ++
C) -=
D) +=

E) C) and D)
F) All of the above

Correct Answer

verifed

verified

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


A) PrintLine
B) WriteText
C) WriteLine
D) PrintText

E) A) and B)
F) B) and C)

Correct Answer

verifed

verified

In general, there are three types of files: text, binary, and bitmap.

A) True
B) False

Correct Answer

verifed

verified

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


A) Result.False
B) DialogResult.Cancel
C) DialogResult.Abort
D) Result.NULL

E) A) and C)
F) None of the above

Correct Answer

verifed

verified

In code, you can display a Save As dialog box by calling the SaveFileDialog control's ____________ method.


A) SaveAs
B) Show
C) ShowDialog
D) Display

E) All of the above
F) None of the above

Correct Answer

verifed

verified

To add an item to a ListBox control with code, you call the control's ____________method.


A) Add.Items
B) Items.Add
C) Items.Append
D) Items.Insert

E) B) and C)
F) A) and B)

Correct Answer

verifed

verified

You can change the default text displayed in the Save As dialog box's title bar by changing the SaveFileDialog control's DisplayText property.

A) True
B) False

Correct Answer

verifed

verified

In order to write data to a text file, you must create a file object using the ____________.


A) TextReader class
B) TextWriter class
C) StreamReader class
D) StreamWriter class

E) None of the above
F) A) and C)

Correct Answer

verifed

verified

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.

A) True
B) False

Correct Answer

verifed

verified

In the update expression of a for loop, you must use the ++ operator in the increment expression.

A) True
B) False

Correct Answer

verifed

verified

Showing 81 - 100 of 112

Related Exams

Show Answer