2nd year ch#5 arrays

2nd year ch#5 arrays

12th Grade

30 Qs

quiz-placeholder

Similar activities

AP CSA Edhesive Units 1 & 2

AP CSA Edhesive Units 1 & 2

10th - 12th Grade

26 Qs

Java Quiz

Java Quiz

11th Grade - University

34 Qs

recursion review 13.3

recursion review 13.3

9th - 12th Grade

30 Qs

Array and ArrayLists in Java

Array and ArrayLists in Java

9th - 12th Grade

25 Qs

TECH IQ CLASH

TECH IQ CLASH

9th - 12th Grade

25 Qs

Q3 Final Comp Sci

Q3 Final Comp Sci

9th - 12th Grade

25 Qs

AP CSA Arrays

AP CSA Arrays

10th - 12th Grade

26 Qs

Master C Fu

Master C Fu

12th Grade

30 Qs

2nd year ch#5 arrays

2nd year ch#5 arrays

Assessment

Quiz

Computers

12th Grade

Medium

Created by

PDCS Server

Used 4+ times

FREE Resource

30 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is an array in programming?
A variable that stores a single value
A collection of variables of the same type
A data structure that stores different types
A sequence of instructions

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How is an array declared in C++?
array<int, size> arr;
arr[size]
int arr[size];
int[size] arr;

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the size of an array determine?
The number of elements it can store
The type of elements it can store
The memory location it occupies
The operations it can perform

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How are array elements accessed in C++?
Sequentially
Using pointer arithmetic
By their memory addresses
Using their indices

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the index of the first element in an array?
0
1
-1
Depends on array size

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How is an array initialized in C++ with constant values?
int arr[] = {1, 2, 3};
arr = {1, 2, 3};
arr = [1, 2, 3];
int arr[3] = {1, 2, 3};

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you access the last element of an array arr with size n in C++?
arr[n-1]
arr[n]
arr[0]
arr[n+1]

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?