1-D Arrays in Visual Basic

1-D Arrays in Visual Basic

12th Grade

10 Qs

quiz-placeholder

Similar activities

C++ Quiz 4: Arrays and Vectors

C++ Quiz 4: Arrays and Vectors

7th - 12th Grade

7 Qs

Белгіленген сипаттары бар элементті іздеу

Белгіленген сипаттары бар элементті іздеу

9th - 12th Grade

10 Qs

Arrays Unit 6 AP CSA

Arrays Unit 6 AP CSA

10th - 12th Grade

14 Qs

Codehs Unit 6

Codehs Unit 6

10th - 12th Grade

14 Qs

Arrays Unit 6 Computer Science

Arrays Unit 6 Computer Science

10th - 12th Grade

14 Qs

Linguaggio C - Ricorsione

Linguaggio C - Ricorsione

11th - 12th Grade

7 Qs

JAVA array

JAVA array

12th Grade - University

10 Qs

S3 Software Dev Quiz

S3 Software Dev Quiz

KG - University

10 Qs

1-D Arrays in Visual Basic

1-D Arrays in Visual Basic

Assessment

Quiz

Computers

12th Grade

Hard

Created by

DEBORAH BLACKBURN

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you declare a 1-D array of integers with 10 elements in Visual Basic?

`Dim arr(10) As Integer`

`Dim arr(9) As Integer`

`Dim arr(1 To 10) As Integer`

`Dim arr(0 To 9) As Integer`

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the correct way to access the third element in a 1-D array named `numbers`?

`numbers(2)`

`numbers(3)`

`numbers[2]`

`numbers[3]`

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How would you modify the fifth element of a 1-D array named `scores` to the value 95?

`scores(4) = 95`

`scores(5) = 95`

`scores[4] = 95`

`scores[5] = 95`

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the default value of elements in a newly declared 1-D array of integers in Visual Basic?

`1`

`0`

`null`

`undefined`

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you declare a 1-D array of strings with 5 elements in Visual Basic?

`Dim arr(5) As String`

`Dim arr(4) As String`

`Dim arr(0 To 4) As String`

`Dim arr(1 To 5) As String`

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements correctly assigns the value "Hello" to the first element of a 1-D array named `greetings`?

`greetings(0) = "Hello"`

`greetings(1) = "Hello"`

`greetings[0] = "Hello"`

`greetings[1] = "Hello"`

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If you have a 1-D array `arr` declared as `Dim arr(4) As Integer`, what is the index of the last element?

`3`

`4`

`5`

`6`

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?