Comp230 Week 6 Quiz

SoccerBoss
Category:
Other
Price: $10 USD

Question description

1. (TCO 6) When you create a VBScript Scripting.FileSystemObject, you must start the code line with _____. (Points : 4)

Let fso = CreateObject
Set fso = CreateObject
Let fso = GetObject
Set fso = GetObject 2.

 (TCO 6) To Create a new file in VBScript, use the following command (assuming fso is a Scripting.FileSystemObject) _____. (Points : 4)

file = fso.CreateTextFile(“C:\Data\CustData.txt”)
Set file = fso.CreateFile(“C:\Data\CustData.txt”)
file = fso.CreateFile(“C:\Data\CustData.txt”)
Set file = fso.CreateTextFile(“C:\Data\CustData.txt”) 3.

(TCO 6) To test to see if a file is not Read Only, use the following VBScript code _____. (Points : 4)

If NOT file.Attributes OR 1 Then
If NOT file.Attributes AND 1 Then
If NOT file.Attributes XOR 1 Then
 If file.Attributes NOT 1 Then 4.

(TCO 6) The following command opens a text file in VBScript. Set file = fso.OpenTextFile(“C:\Data\CustData.txt”, ?, ??, ???) To open a file for writing, the value of ? must be _____. (Points : 4)

The value of ? must be 1
The value of ? must be 2
The value of ? must be True
The value of ? must be False 5.

(TCO 6) The following command opens a text file in VBScript. Set file = fso.OpenTextFile(“C:\Data\CustData.txt”, ?, ??, ???) To ensure that the file is formatted as ASCII instead of Unicode, the value of ??? must be _____. (Points : 4)

The value of ??? must be 0
The value of ??? must be -1
The value of ??? must be 2
The value of ??? must be -2 6.

(TCO 6) In VBScript, to bypass reading the next line of text terminated by a newline (CR/LF), use the following method (assuming fileObj is a file object created with OpenTextFile) _____. (Points : 4)

fileObj.SkipLines(1)
fileObj.SkipLine( )
fileObj.IgnoreLine(1)
fileObj.NextLine( )

Tutor Answer

(Top Tutor) Daniel C.
(997)
School: Rice University
PREMIUM TUTOR
Studypool has helped 1,244,100 students
Ask your homework questions. Receive quality answers!

Type your question here (or upload an image)

1830 tutors are online

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors