
Topic 2: Arrays and Data Structures
Quiz
•
Computers
•
12th Grade
•
Practice Problem
•
Hard
najihah ibrahim
FREE Resource
Enhance your content in a minute
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
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
15 questions
Ôn tập Python
Quiz
•
9th - 12th Grade
15 questions
Grade 8 End of Unit Revision
Quiz
•
8th Grade - University
10 questions
java script
Quiz
•
12th Grade
10 questions
Variables and Data Types
Quiz
•
10th - 12th Grade
16 questions
Python Review
Quiz
•
9th - 12th Grade
15 questions
CodeHS - Intro to Python - Conditionals Quiz
Quiz
•
9th Grade - Professio...
14 questions
Evaluation Python 2
Quiz
•
12th Grade
9 questions
C# Variables and Data Types
Quiz
•
8th Grade - University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
