What is an array?
Chapter 2-1: Array Part 1

Quiz
•
Computers
•
University
•
Medium
najihah ibrahim
Used 1+ times
FREE Resource
12 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
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);
Create a free account and access millions of resources
Similar Resources on Quizizz
10 questions
CS1010 Lab 4

Quiz
•
University
10 questions
C++ vs Python: A Quiz Introduction

Quiz
•
11th Grade - University
17 questions
Coding Titans

Quiz
•
University
10 questions
Java Arrays

Quiz
•
University
10 questions
C Program Array and strings

Quiz
•
University
10 questions
Array in C

Quiz
•
University
10 questions
Arrays in C (II yr 02.07.2020)

Quiz
•
University
12 questions
Arrays C++

Quiz
•
University
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade