Search Header Logo

Arrays and Vectors Quiz

Authored by John Miller

Computers

12th Grade

Arrays and Vectors Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

12 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

2 mins • 3 pts

Media Image

cat is found at index 0 and tiger is found at index 2
cat is found at index 1 and tiger is found at index 3
cat is found at index 0 and tiger is found at index 3
cat is found at index 1 and tiger is found at index 2

2.

MULTIPLE CHOICE QUESTION

2 mins • 3 pts

Media Image

I only
II only
I and II only
I and III only

3.

MULTIPLE CHOICE QUESTION

2 mins • 3 pts

If the size of an array is 9, the valid indices range from:

0 - 9
1 - 9
0 - 8
What is an indices?

4.

MULTIPLE CHOICE QUESTION

2 mins • 3 pts

Which of the following is the correct way to construct an array that holds 5 decimals?

int array[5];
string array[5];
double array[5];
char array[5];

5.

MULTIPLE CHOICE QUESTION

2 mins • 3 pts

Media Image

What value will be outputted by the following statement?

9
1
92
11

6.

MULTIPLE CHOICE QUESTION

2 mins • 3 pts

Media Image

Assume that the array num has been defined as an array and initialized with 5 int values. What is the purpose of the following code segment?

It increments variable count if the index is even and the contents at that index is even.
It increments variable count if the index is odd and the contents at that index is even.
It increments variable count if the index is even and the contents at that index is odd.
It increments variable count if the index is odd and the contents at that index is odd.

7.

MULTIPLE CHOICE QUESTION

2 mins • 3 pts

Media Image

What are the contents of array myArray after the following code segment executes?

5 10 15 20
1 1 1 1
1 2 3 4
1 10 15 20

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?

Discover more resources for Computers