What is the output of the following program segment?

``` Dim c As Double
Dim temp() As String = IO.File.ReadAllLines("Data1.txt")
Dim n As Integer = temp.Count - 1
Dim a(n) As Double
For i As Integer = 0 To n
a(i) = CDbl(temp(i))
Next
temp() = IO.File.ReadAllLines("Data2.txt")
Dim b(n) As Double
For i As Integer = 0 To n
b(i) = CDbl(temp(i))
Next
For k As Integer = 0 To n
If a(k) = b(k) Then
c += 1
End If
Next
lstBox.Items.Add(c)

```
Assume the twenty rows of the file Data1.txt contain the following entries: 3, 2, 5, 1, 7, 8, 3,
5, 6, 2, 3, 6, 1, 6, 5, 5, 7, 2, 5, 3.
Assume the twenty rows of the file Data2.txt contain the following entries: 5, 3, 3, 4, 8, 2, 3,
5, 9, 5, 3, 7, 3, 7, 6, 3, 2, 1, 3, 4.
(A) 2
(B) 3
(C) 4
(D) 5
(E) 6


(B) 3

Computer Science & Information Technology

You might also like to view...

If you have a class template declared and you instantiate it in you program twice (both times it is instantiated with an integer), how many versions of the class does the compiler create?

What will be an ideal response?

Computer Science & Information Technology

Case-based Critical Thinking QuestionsCase 13-1Judy wants to be able to validate the XML documents that she uses for recipes. These documents include numeric elements that specify ingredient amounts and cooking times, so you recommend that she use a schema instead of a DTD, and you teach her some of the key facts about schemas. Judy has an attribute called "recipeType" that she uses to record whether the recipe is for an appetizer, entree, dessert, or other type of dish. This attribute only contains text. Which of the following would be a valid XML schema definition for this attribute?

A. recipeType B. C. recipeType D.

Computer Science & Information Technology

PandA representation is what kind of system?

a. decimal b. binary c. hexadecimal d. byte

Computer Science & Information Technology

When you want more information about a specific color in a document, use the ____ to show the color values beneath the mouse pointer.

a. Color selector b. Paint Bucket Tool c. Magic Wand Tool d. Info panel

Computer Science & Information Technology