Chapter 2-1: Array Part 1
Quiz
•
Computers
•
University
•
Practice Problem
•
Medium
najihah ibrahim
Used 1+ times
FREE Resource
Enhance your content in a minute
12 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is an array?
A collection of variables of the same type stored in contiguous memory locations.
A collection of variables of different types stored in non-contiguous memory locations.
A collection of functions.
A type of loop structure.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following correctly declares an array in Java?
int array;
int array[10];
int[] array = new int[10];
array array[10];
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the index of the first element in an array?
-1
0
1
The index is undefined
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you access the third element in an array named arr in Java?
arr[3];
arr(3);
arr[2];
arr{3};
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following statements correctly initializes an array of 5 integers to zero?
int[] arr = {0, 0, 0, 0, 0};
int[] arr = (0, 0, 0, 0, 0);
int[] arr = [0, 0, 0, 0, 0];
int[] arr = new int[5];
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a multi-dimensional array?
An array with only one dimension.
An array that can store values of different types.
An array with more than one dimension, such as a 2D array.
An array that uses pointers.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you declare a two-dimensional array in Java?
int arr[2];
int[][] arr = new int[2][3];
int arr{2,3};
int arr(2,3);
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
10 questions
python quiz
Quiz
•
6th Grade - Professio...
16 questions
E-Commerce
Quiz
•
University - Professi...
15 questions
8051-MCQ
Quiz
•
University
15 questions
Object Oriented Programming Assessment 1
Quiz
•
University
11 questions
Tutorium 1 - Prog2
Quiz
•
University
12 questions
Quiz No. 2.2 Hash Tables
Quiz
•
University
10 questions
computer Networks
Quiz
•
University
10 questions
Industry 4.0 Unit 1
Quiz
•
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
