
array read and access
Authored by ZURAIDAH Moe
Computers
University
Used 5+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
12 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Grace is a computer science student who needs to create an array of student ids for her project. The ids she needs to include are 115331, 450055, 555641, 875560, and 987555.
int [ ] id = new {115331, 450055, 555641, 875560, 987555};
int [5] id = {115331, 450055, 555641, 875560, 987555};
int [ ] id = {115331, 450055, 555641, 875560, 987555};
int [ ] id = new int [5];
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Hannah is working on a Java project where she needs to create an array of subject codes for her classes. The subject codes are S, M, C, P, I, and K. How should she declare this array in Java?
char [ ] code = {'S', 'M', 'C', 'P', 'I' and 'K'};
char [ ] code = {S, M, C, P, I, K};
char [ ] code = {"S", "M", "C", "P", "I", "K"};
char [ ] code = {'S', 'M', 'C', 'P', 'I', 'K'};
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Java code to display the size of an array name studentname[ ] which contains the names of students in a class, including Abigail, Charlotte, and Harper.
System.out.println("The size is " + studentname[ index ]);
System.out.println("The size is " + studentname.length);
System.out.println("The size is " + length.length);
System.out.println("The size is " + studentname);
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Java code to display all elements of array studentname[ ].
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Java code to read elements into array studentname[ ].
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Java code to read elements into array customerid[ ].
None of the above is the right answer.
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
A code segment to identify the largest element in an array.
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
Computer Graphics
Quiz
•
University
15 questions
Datos. Tipos de datos y operadores
Quiz
•
University
15 questions
Soal Java
Quiz
•
11th Grade - University
10 questions
NumPy
Quiz
•
9th Grade - University
10 questions
Weekly Contest #3 - TechXNinjas
Quiz
•
University
10 questions
C - Pointers
Quiz
•
University
15 questions
ReactJS Quiz
Quiz
•
University
15 questions
Post Test Modul 4 APSI
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