Which of the following code segments writes the contents of three parallel arrays named strStudentName, intID, and strMajor to a file in the format below? Assume all arrays have the same number of elements. Vince Student, 1234, Computer Science
Nancy Student, 4321, Electrical Engineering
A) For intCount = 0 to strStudentName.Length - 1 outputFile.Write(strStudentName(intCount)
OutputFile.Write(", ")
OutputFile.Write(intID(intCount) )
OutputFile.Write(", ")
OutputFile.WriteLine(strMajor(intCount) )
Next intCount
B) For intCount =0 to strStudentName.Length - 1 outputFile.WriteLine(strStudentName(intCount) & ", ")
OutputFile.WriteLine(intID(intCount) & ", ")
OutputFile.WriteLine(strMajor(intCount) )
Next intCount
C) For intCount = 0 to strStudentName.Length - 1 outputFile.Write(strStudentName(intCount) )
OutputFile.Write(", ")
OutputFile.Write(intID(intCount) )
OutputFile.Write(", ")
OutputFile.Write(strMajor(intCount) )
Next intCount
D) For intCount = 1 to strStudentName.Length outputFile.Write(strStudentName(intCount)
OutputFile.Write(", ")
OutputFile.Write(intID(intCount) )
OutputFile.Write(", ")
OutputFile.Write(strMajor(intCount) )
Next intCount
Correct Answer:
Verified
Q26: To change the color of text in
Q27: Reports with columnar data should not use
Q28: The fields within a structure can be
Q29: A structure should be used instead of
Q30: An Open dialog box displays the current
Q31: This method places an item of data
Q33: Which of the following declares a structure
Q34: Which of the following writes a blank
Q35: The color of text printed by an
A)
Q36: This property allows the developer to specify
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents