array read and access

array read and access

University

12 Qs

quiz-placeholder

Similar activities

Weekly Contest #3 - TechXNinjas

Weekly Contest #3 - TechXNinjas

University

10 Qs

Creative Computation for Visual Communication Design

Creative Computation for Visual Communication Design

University

12 Qs

Week 8: Vectors

Week 8: Vectors

University

14 Qs

BCSC0006 - Quiz 4 - Linked List & Stacks

BCSC0006 - Quiz 4 - Linked List & Stacks

University

10 Qs

Datos. Tipos de datos y operadores

Datos. Tipos de datos y operadores

University

15 Qs

Memahami PBO

Memahami PBO

11th Grade - University

15 Qs

DATSRUC Week 6

DATSRUC Week 6

10th Grade - University

15 Qs

BCA

BCA

University

10 Qs

array read and access

array read and access

Assessment

Quiz

Computers

University

Medium

Created by

ZURAIDAH Moe

Used 5+ times

FREE Resource

AI

Enhance your content

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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[ ].

Media Image
Media Image
Media Image
Media Image

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Java code to read elements into array studentname[ ].

Media Image
Media Image
Media Image
Media Image

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Java code to read elements into array customerid[ ].

Media Image
Media Image
Media Image

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.

Media Image
Media Image
Media Image
Media Image

Create a free account and access millions of resources

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?