Arrays in c++

Arrays in c++

1st - 10th Grade

28 Qs

quiz-placeholder

Similar activities

Arrays

Arrays

10th - 12th Grade

26 Qs

Arrays and Lists

Arrays and Lists

10th - 12th Grade

29 Qs

Java Arrays and ArrayLists

Java Arrays and ArrayLists

10th - 12th Grade

29 Qs

pra PSPM SC025 (F02 KML)

pra PSPM SC025 (F02 KML)

6th Grade - University

24 Qs

Основы C#

Основы C#

1st - 12th Grade

24 Qs

CS Principles Unit 6 Assessment Review

CS Principles Unit 6 Assessment Review

9th - 12th Grade

24 Qs

Quiz Básico de Java

Quiz Básico de Java

7th Grade - Professional Development

25 Qs

PAS_Pemrogrman Dasar X_RPL@2020

PAS_Pemrogrman Dasar X_RPL@2020

10th 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?