Grade 11 Exam  >  Grade 11 Tests  >  Test: Arrays - Grade 11 MCQ

Test: Arrays - Grade 11 MCQ


Test Description

10 Questions MCQ Test - Test: Arrays

Test: Arrays for Grade 11 2025 is part of Grade 11 preparation. The Test: Arrays questions and answers have been prepared according to the Grade 11 exam syllabus.The Test: Arrays MCQs are made for Grade 11 2025 Exam. Find important definitions, questions, notes, meanings, examples, exercises, MCQs and online tests for Test: Arrays below.
Solutions of Test: Arrays questions in English are available as part of our course for Grade 11 & Test: Arrays solutions in Hindi for Grade 11 course. Download more important topics, notes, lectures and mock test series for Grade 11 Exam by signing up for free. Attempt Test: Arrays | 10 questions in 30 minutes | Mock test for Grade 11 preparation | Free important questions MCQ to study for Grade 11 Exam | Download free PDF with solutions
Test: Arrays - Question 1

Which of these best describes an array?

Detailed Solution for Test: Arrays - Question 1

Array contains elements only of the same type.

Test: Arrays - Question 2

How do you instantiate an array in Java?

Detailed Solution for Test: Arrays - Question 2

Note that int arr[]; is declaration whereas int arr[] = new int[3]; is to instantiate an array.

Test: Arrays - Question 3

What is the output of the following Java code?
public class array
{
    public static void main(String args[])
    {
        int []arr = {1,2,3,4,5};
        System.out.println(arr[2]);
        System.out.println(arr[4]);
    }
}

Detailed Solution for Test: Arrays - Question 3

Array indexing starts from 0.

Test: Arrays - Question 4

When does the ArrayIndexOutOfBoundsException occur?

Detailed Solution for Test: Arrays - Question 4

ArrayIndexOutOfBoundsException is a run-time exception and the compilation is error-free.

Test: Arrays - Question 5

What are the advantages of arrays?

Detailed Solution for Test: Arrays - Question 5

Arrays store elements of the same data type and present in continuous memory locations.

Test: Arrays - Question 6

Assuming int is of 4bytes, what is the size of int arr[15];?

Detailed Solution for Test: Arrays - Question 6

Since there are 15 int elements and each int is of 4bytes, we get 15*4 = 60bytes.

Test: Arrays - Question 7

Elements in an array are accessed _____________

Detailed Solution for Test: Arrays - Question 7

Elements in an array are accessed randomly. In Linked lists, elements are accessed sequentially.

Test: Arrays - Question 8

How do you initialize an array in C?

Detailed Solution for Test: Arrays - Question 8

This is the syntax to initialize an array in C.

Test: Arrays - Question 9

Which of the following is the correct way to declare a multidimensional array in Java?

Detailed Solution for Test: Arrays - Question 9

The syntax to declare multidimensional array in java is either int[][] arr; or int arr[][];

Test: Arrays - Question 10

What is the output of the following Java code?

public class array
{
    public static void main(String args[])
    {
        int []arr = {1,2,3,4,5};
        System.out.println(arr[5]);
    }
}

Detailed Solution for Test: Arrays - Question 10

Trying to access an element beyond the limits of an array gives ArrayIndexOutOfBoundsException.

Information about Test: Arrays Page
In this test you can find the Exam questions for Test: Arrays solved & explained in the simplest way possible. Besides giving Questions and answers for Test: Arrays, EduRev gives you an ample number of Online tests for practice
Download as PDF