Arrays

Arrays

Assessment

Quiz

Computers, Other

University

Medium

Created by

Tim Bowry

Used 1+ times

FREE Resource

Student preview

quiz-placeholder

16 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Unlike regular variables, __________ can hold multiple values.

constants

named constants

arrays

floats

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

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

data type

index

value

name

3.

MULTIPLE CHOICE QUESTION

20 sec • 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]

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Unlike regular variables, __________ can hold multiple values.

constants

functions

arrays

floats

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

In an array, every element has the same
data type

subscript / index

memory location
all of the above

6.

MULTIPLE CHOICE QUESTION

20 sec • 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]

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you initialize an array in C/C++?

int arr[3] = (1,2,3);

int arr(3) = {1,2,3};

int arr[3] = {1,2,3};

int arr(3) = (1,2,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?