Java Arrays

Java Arrays

University

10 Qs

quiz-placeholder

Similar activities

OOP - Quiz

OOP - Quiz

University

15 Qs

Java arrays

Java arrays

University

7 Qs

Array Java

Array Java

University

15 Qs

IEEE Coding Competition

IEEE Coding Competition

University

13 Qs

Quiz 2

Quiz 2

University

12 Qs

SLG IPC Week 7

SLG IPC Week 7

University

13 Qs

Array

Array

University

12 Qs

Round 1 (Tech Utsav)

Round 1 (Tech Utsav)

University

15 Qs

Java Arrays

Java Arrays

Assessment

Quiz

Computers

University

Medium

Created by

Ms N Suganya CSE - 2700

Used 1+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is missing in the following array declaration?___[] arr;

int

float

double

char

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is missing in the following array initialization?int[] arr = ___;

{1,2,3}

new int[] {1, 2, 3}

new int[3]

new int()

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is missing in the following array creation?int[] arr = new int[___];

size

10

length

size()

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the error in the following code?int[] arr = {1, 2, 3};

System.out.println(arr[3]);

ArrayIndexOutOfBoundsException

NullPointerException

Syntax Error

No Error

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is missing in the following multi-dimensional array declaration?int[][] arr = new int[3][___];

3

size

columns

length

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the error in the following code?int[] arr;

arr[0] = 10;

ArrayIndexOutOfBoundsException

NullPointerException

Uninitialized Array Error

No Error

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is missing in the following array element assignment?int[] arr = new int[5];

arr[2] = ___;

5

10

arr[0]

all of the above

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?