Filters
Question type

Study Flashcards

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

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

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

Correct Answer

verifed

verified

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

Correct Answer

verifed

verified

D

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

Correct Answer

verifed

verified

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


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

Correct Answer

verifed

verified

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

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

Correct Answer

verifed

verified

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

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

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

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


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

Correct Answer

verifed

verified

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

Correct Answer

verifed

verified

True

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

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

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")

Correct Answer

verifed

verified

The ____ method writes a newline character after the data.


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

Correct Answer

verifed

verified

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

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

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

Showing 1 - 20 of 60

Related Exams

Show Answer