C++ arrays

C++ arrays

12th Grade

25 Qs

quiz-placeholder

Similar activities

Array and ArrayLists in Java

Array and ArrayLists in Java

9th - 12th Grade

25 Qs

Arrays and ArrayLists in Java

Arrays and ArrayLists in Java

9th - 12th Grade

25 Qs

XI Arrays & Structtures 2023

XI Arrays & Structtures 2023

9th - 12th Grade

20 Qs

JavaScript Arrays Quiz

JavaScript Arrays Quiz

11th Grade - University

20 Qs

Java, part I

Java, part I

11th Grade - University

20 Qs

Java Arrays

Java Arrays

9th - 12th Grade

20 Qs

APCSA Arrays

APCSA Arrays

9th - 12th Grade

20 Qs

Unit 6 ArrayLists and String Methods

Unit 6 ArrayLists and String Methods

9th - 12th Grade

20 Qs

C++ arrays

C++ arrays

Assessment

Quiz

Computers

12th Grade

Medium

Created by

Dr. Moriarty

Used 6+ times

FREE Resource

25 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Unlike regular variables, arrays can hold multiple values

true

false

2.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

In a C++ array, every element has the same

data type (like int, bool, char, etc)

subscript
memory location
all of the above

3.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

What is the last legal subscript that can be used with the following array?

int values[5];

Hint: what's the highest number you can put in for x in the [ ] for "cout<<values[x]"?

0

5

6

4

4.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Given the following declaration, where is the value 77 stored in the scores array?

int scores[] = {83, 62, 77, 97, 86}

scores[0]

scores[1]

scores[2]

scores[3]

5.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

What will the following code display?

int numbers[5] = {99, 87, 66, 55, 101};

for (int i = 1; i < 4; i++)

cout << numbers[i] << " ";

99 87 66 55 101

87 66 55 101

87 66 55

Nothing. This code has an error.

6.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

An array of string objects that will hold five names would be declared with which of the following statements?

string names[5];

string names(5);

string names 5;

String[5] = names;

7.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Given the following declaration, where is the value 15 stored in the nums array?

int nums[] = {83, 15, 57, 87, 80}

nums[0]

nums[1]

nums[2]

nums[3]

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?