Data Structure and Algorithm Prelim and Premid Examination

Quiz
•
Life Skills
•
3rd Grade
•
Hard
Nilou Jay Fernandez
Used 1+ times
FREE Resource
30 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is an array in Java?
An array in Java is a dynamic data structure that can change size.
An array in Java is a type of object that can only hold a single value.
An array in Java can store values of different types.
An array in Java is a fixed-size data structure that stores multiple values of the same type.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you create an array in Java?
You create an array in Java using 'arrayName = new type[size];'.
Arrays in Java are created with 'type arrayName = new type[size];'.
You create an array in Java using the syntax: 'type[] arrayName = new type[size];'.
You can declare an array in Java with 'type arrayName[] = new type[size];'.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What symbol is used to access an element in an array?
<>
{}
.
[]
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you find the length of an array in Java?
Use 'arrayName.size()' to find the length of an array in Java.
Use 'arrayName.length' to find the length of an array in Java.
Use 'lengthOf(arrayName)' to get the length of an array in Java.
Call 'arrayName.getLength()' to determine the length of an array in Java.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the first index of an array?
1
0
5
-1
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you loop through an array using a for loop?
for (let i = 0; i < array.length; i++) { print(array[i]); }
for (let i = 1; i <= array.length; i++) { console.log(array[i]); }
for (i = 0; i < array.length; i++) { console.log(i); }
for (let i = 0; i < array.length; i++) { console.log(array[i]); }
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens if you try to access an index that is out of bounds?
The program continues without any issues.
The index is automatically adjusted to the nearest valid index.
An error or exception is raised.
A warning message is displayed but no error occurs.
Create a free account and access millions of resources
Similar Resources on Wayground
30 questions
ULANGKAJI RBT TINGKATAN 3

Quiz
•
1st - 10th Grade
25 questions
Islamic Quiz 2022

Quiz
•
2nd - 5th Grade
30 questions
Thi Phụ trách sao giỏi

Quiz
•
3rd Grade
29 questions
Câu hỏi về kỹ năng sống

Quiz
•
1st - 5th Grade
32 questions
Fun with English and Spanish Cognates

Quiz
•
3rd Grade
32 questions
Quiz về Trường Xanh Tuệ Đức

Quiz
•
3rd Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

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

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Life Skills
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
Unit 2 Review Game - Factors 0, 1, 2, 5, 9, 10

Quiz
•
3rd Grade
14 questions
3rd Grade Matter and Energy Review

Quiz
•
3rd Grade
14 questions
Place Value

Quiz
•
3rd Grade
5 questions
Remembering 9/11 Patriot Day

Lesson
•
3rd - 5th Grade
20 questions
Run-On Sentences and Sentence Fragments

Quiz
•
3rd - 6th Grade
20 questions
4 Types of Sentences

Quiz
•
3rd - 5th Grade
10 questions
Place Value

Quiz
•
3rd Grade