Filters
Question type

Study Flashcards

Which of the following can be used to determine whether the accounts.txt file exists?


A) If IO.Exists.File("accounts.txt") Then
B) If IO.File.Exists("accounts.txt") Then
C) If IO.File("accounts.txt") Then
D) If IO.Exists("accounts.txt") Then

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

Correct Answer

verifed

verified

Data types created using the Structure statement are referred to as user-defined data types or structures.

A) True
B) False

Correct Answer

verifed

verified

True

Files that are read by the computer are called ____ files.


A) storage
B) serial
C) input
D) report

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

Correct Answer

verifed

verified

Most programmers use the Structure statement,rather than the Class statement,to create data types that contain procedures.

A) True
B) False

Correct Answer

verifed

verified

Write a Do clause that reads each line of text in a sequential access file and assigns the line to the strTextLine variable.Process the loop until the end of the file has been reached.The file is associated with a StreamReader variable named inFile.

Correct Answer

verifed

verified

Do Until inFile.Peek...

View Answer

Which of the following statements will close the sequential access file associated with the outFile variable?


A) outFile.End()
B) outFile.Quit()
C) outFile.IO()
D) outFile.Close()

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

Correct Answer

verifed

verified

D

Case 1 - Frames Unlimited Frames Unlimited is a wholesale picture and poster frame business. Frame data is stored in sequential access files that contain four columns: item number, item name, size, and price. -Which of the following statements should be used first when opening the input file?


A) If IO.File.Exists("pictureFrame57.txt") Then
B) If IO.File.Exists("pictureFrame.txt") Then
C) inFile = IO.File.OpenText("pictureFrame57.txt")
D) inFile = IO.File.OpenText("pictureFrame.txt")

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

Correct Answer

verifed

verified

Programmers use structure variables to store related items in an array,even when the items have different data types.

A) True
B) False

Correct Answer

verifed

verified

After opening a file for input,you can use the ____ to read the file's contents,one line at a time.


A) ReadLine method
B) OpenText method
C) AppendText method
D) WriteLine method

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

Correct Answer

verifed

verified

The syntax used to declare a StreamWriter variable is ____.


A) {Dim|Private} streamWriterVariableName IO.StreamWriter
B) {Dim|Private} streamWriterVariableName As IN.StreamWriter
C) {Dim|Private} streamWriterVariableName As IO.StreamWriter
D) {Dim|Private} streamWriterVariableName As StreamWriter

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

Correct Answer

verifed

verified

The ____ method writes a newline character after the data.


A) WriteLine
B) ReadLine
C) Write method
D) Read

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

Correct Answer

verifed

verified

Write the code to declare a variable named inFile that can be used to read data from a sequential access file.Then write the statement to open a sequential access file named samples.txt for input.

Correct Answer

verifed

verified

Dim inFile As IO.Str...

View Answer

Write a Structure statement that defines a structure named Vehicle.The structure contains three member variables named strMake,strModel,and intYear.Then write the Private statement that declares a Vehicle variable named truck.

Correct Answer

verifed

verified

Structure Vehicle
Public strMa...

View Answer

What is the difference between a structure and a structure variable?

Correct Answer

verifed

verified

A STRUCTURE IS A USER-DEFINED DATA TYPE ...

View Answer

Which of the following determines whether an item is selected in the lstTrees control?


A) If lstTrees.SelectedIndex = -1 Then
B) If lstTrees.SelectedIndex <> -1 Then
C) If lstTrees.SelectedIndex > -1 Then
D) If lstTrees.SelectedIndex < -1 Then

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

Correct Answer

verifed

verified

You can use the ____ to open a sequential access file for append.


A) CreateText method
B) StreamReader object
C) StreamWriter object
D) AppendText method

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

Correct Answer

verifed

verified

D

Variables declared using a structure are often referred to as ____.


A) functions
B) Subs
C) structure variables
D) objects

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

Correct Answer

verifed

verified

Assume that the variable amount contains the value 46.How many characters will be padded in the statement below? amount = amount.ToString.PadLeft(5)


A) two
B) three
C) four
D) five

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

Correct Answer

verifed

verified

When you pass a structure variable to a Sub or Function procedure,its member variables are not automatically passed.

A) True
B) False

Correct Answer

verifed

verified

Write the code to declare a variable named outFile that can be used to write data to a sequential access file.Then write the statement to open a sequential access file named samples.txt for output.New data should be written to the file after any existing data in the file.

Correct Answer

verifed

verified

Dim outFile As IO.St...

View Answer

Showing 1 - 20 of 60

Related Exams

Show Answer