Multiple Choice
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
Correct Answer:
Verified
Q1: Which of the following declares a structure
Q2: This method is used to add more
Q3: Which of the following code segments creates
Q4: When a file is selected from an
Q5: Which of the following statements are not
Q7: An application must first _a file before
Q8: The fields within a structure can be
Q9: An Open dialog box displays the current
Q10: What does the following line do? Do
Q11: To left justify the columns in the