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
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);
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Java Arrays

Quiz
•
University
12 questions
Arrays C++

Quiz
•
University
12 questions
JavaScript Quiz

Quiz
•
University
10 questions
DSA(UNIT 1) Test 1

Quiz
•
University
15 questions
Arrays and Pointers in C

Quiz
•
University
12 questions
Python Quiz 1.6

Quiz
•
University
15 questions
ARRAYS AND FUNCTIONS

Quiz
•
University
10 questions
cp06-01-1D-Array

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

Quiz
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
15 questions
Properties of Equality

Quiz
•
8th Grade - University
38 questions
WH - Unit 3 Exam Review*

Quiz
•
10th Grade - University
21 questions
Advise vs. Advice

Quiz
•
6th Grade - University
12 questions
Reading a ruler!

Quiz
•
9th Grade - University