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
```


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
```

Computer Science & Information Technology

You might also like to view...

Estimate (i) graph degree centrality ( GDC ), (ii) graph closeness centrality ( GCC ), and (iii) graph betweenness centrality ( GBC ) for the network in Figure 3.2 .

Computer Science & Information Technology

Which HTML attribute is used to define inline styles?

a. class b. id c. style d. styles e. css

Computer Science & Information Technology

What PC technology would be most affected by nanotechnology?

A) Storage B) Power C) Processor D) Connectivity

Computer Science & Information Technology

Which of the following layers of the OSI model does a network router perform traffic routing at?

A. Layer 3 B. Layer 4 C. Layer 2 D. Layer 5

Computer Science & Information Technology