
Topic 2: Arrays and Data Structures

Quiz
•
Computers
•
12th Grade
•
Hard
najihah ibrahim
FREE Resource
11 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the primary operation performed on an array?
Store and retrieve
Sort and filter
Add and remove
Display and hide
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How many dimensions can an array have?
Only one
Only two
Two or three
One, two, three, or more
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In Java, how do you declare an array of 150 grades of real numbers?
int[] grades = new int[150];
float grades = new float[150];
double[] grades = new double[150];
double grades[150];
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does a sparse matrix primarily consist of?
A mix of zeros and non-zeros
Only non-zero elements
Only positive numbers
Only zero elements
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the formula to calculate the number of elements in an array A[l:u]?
u + l + 1
u + l
u - l + 1
u - l
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a valid way to initialize a two-dimensional array in Java?
int[][] arr = new int[5][5];
int arr[5][5];
int arr = new int[5][5];
int[5][5] arr;
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the address calculation for a one-dimensional array A[i] in memory?
α + i
α - i
α * i
α / i
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
2D Arrays

Quiz
•
9th - 12th Grade
10 questions
Introduction to Arrays

Quiz
•
KG - University
15 questions
Data Structures

Quiz
•
12th Grade
10 questions
Quiz Bahasa C++ 1

Quiz
•
9th - 12th Grade
10 questions
Conocimientos en Videojuegos y Unity

Quiz
•
12th Grade - University
9 questions
Unit 10 quiz topic 2

Quiz
•
9th - 12th Grade
14 questions
Exploring Computer Science

Quiz
•
10th - 12th Grade
10 questions
Arrays

Quiz
•
10th - 12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade