Arrays in c++

Arrays in c++

1st - 10th Grade

28 Qs

quiz-placeholder

Similar activities

AP Computer Science Principles Arrays

AP Computer Science Principles Arrays

10th - 12th Grade

26 Qs

Review Arrays

Review Arrays

9th - 12th Grade

32 Qs

2 D Arrays

2 D Arrays

10th - 12th Grade

24 Qs

Array List

Array List

9th - 12th Grade

25 Qs

AP CSA - Unit 6 Arrays Test Review

AP CSA - Unit 6 Arrays Test Review

10th - 12th Grade

30 Qs

Unit 6 Computer Science Arrays

Unit 6 Computer Science Arrays

10th - 12th Grade

26 Qs

CS Arrays

CS Arrays

10th - 12th Grade

26 Qs

AP CSA Java Arrays

AP CSA Java Arrays

10th - 12th Grade

26 Qs

Arrays in c++

Arrays in c++

Assessment

Quiz

Computers

1st - 10th Grade

Medium

Created by

L L

Used 6+ times

FREE Resource

28 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Unlike regular variables, __________ can hold multiple values.

constants

named constants

arrays

floats

2.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

To access an array element, use the array name and the element's ___________.

data type

subscript

value

name

3.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

The name of an array stores the __________ of the first array element.

value

memory address

element number

data type

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 is the last legal subscript that can be used with the following array?

int values[5];

0

5

6

4

6.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

To pass an array as an argument to a function, pass the __________ of the array.

contents

size, expressed as an integer

name

value of the first element

7.

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.

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?