Unit 6 Comp Sci A Arrays
Quiz
•
Computers
•
10th - 12th Grade
•
Hard
Thomas Martinez
FREE Resource
Enhance your content
14 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is FALSE about arrays on Java
A java array is an object
Length of array can be changed after creation of array
Numerical data types of arrays are initialized to 0 to start
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Find the output
class Test {
public static void main(String args[]) {
int arr[2];
System.out.println(arr[0]);
System.out.println(arr[1]);
}
}
Compile error
Exception
Garbage Value
Garbage Value
0
0
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Find the output
class Test {
public static void main(String args[]) {
int [ ] arr = new int[2];
System.out.println(arr[0]);
System.out.println(arr[1]);
}
}
Compile error
Exception
Garbage Value
Garbage Value
0
0
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the length of the following array: int [] data = { 12, 34, 9, 0, -62, 88 };
1
5
6
12
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Output of following Java program?
class Test{
public static void main (String[] args) {
int [] arr1 = {1, 2, 3};
int [] arr2 = {1, 2, 3};
if (arr1 == arr2)
System.out.println("Same");
else
System.out.println("Not same");
}}
Same
Not same
Error
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What are the indexes for the array ar, given the following declaration:
int[] ar = {2, 4, 6, 8 }
0, 1, 2, 31, 2, 3, 40, 2, 4, 6Create a free account and access millions of resources
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
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
10 questions
ว30285-ทดสอบเรื่องคำสั่งแบบเงื่อนไข
Quiz
•
10th Grade
16 questions
CyberSafety Pre-Assessment
Quiz
•
KG - University
14 questions
4th quarter 2nd summative
Quiz
•
10th Grade
16 questions
OCR Sys Arch J277
Quiz
•
10th - 12th Grade
15 questions
File Handling in Python - Grade 12 CBSE
Quiz
•
12th Grade
15 questions
Problem Solving : Design Solution
Quiz
•
12th Grade
12 questions
Features of IDEs
Quiz
•
9th - 12th Grade
16 questions
Pascal. 10 кл. Повторение
Quiz
•
10th Grade
Popular Resources on Wayground
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
11 questions
NEASC Extended Advisory
Lesson
•
9th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
10 questions
Boomer ⚡ Zoomer - Holiday Movies
Quiz
•
KG - University
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns
Quiz
•
3rd Grade
20 questions
Multiplying and Dividing Integers
Quiz
•
7th Grade
