Arrays in c++

Arrays in c++

1st - 10th Grade

28 Qs

quiz-placeholder

Similar activities

Kisi PTS GENAP PD

Kisi PTS GENAP PD

10th Grade

25 Qs

Java Arrays and ArrayLists

Java Arrays and ArrayLists

9th - 12th Grade

25 Qs

APCSA Topic 7

APCSA Topic 7

9th - 12th Grade

25 Qs

C++ Array

C++ Array

1st - 10th Grade

28 Qs

C# .Net Arrays and Split String Method

C# .Net Arrays and Split String Method

1st - 5th Grade

25 Qs

AP CSA Unit 6 Arrays

AP CSA Unit 6 Arrays

10th - 12th Grade

26 Qs

Intro to Algorithms

Intro to Algorithms

9th - 12th Grade

23 Qs

1st Period Feb 22, 2024 - Virtual AP CompSci AP

1st Period Feb 22, 2024 - Virtual AP CompSci AP

9th - 12th Grade

25 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?