
Arrays and Vectors Quiz
Authored by John Miller
Computers
9th - 12th Grade
Used 1+ times

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
1 min • 3 pts
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
1 min • 3 pts
I only
II only
I and II only
I and III only
3.
MULTIPLE CHOICE QUESTION
1 min • 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
1 min • 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
1 min • 3 pts
What value will be outputted by the following statement?
9
1
92
11
6.
MULTIPLE CHOICE QUESTION
1 min • 3 pts
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
1 min • 3 pts
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

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?