Quiz: Array

To View Tricks: Login Required

Number of Questions: 9

Question: 1 -

Java Array can allocate __________.

Options:
  1. Both Dynamic Memory and Static Memory

  2. None of the above

  3. Static Memory

  4. Dynamic Memory

  5. Answer:

    Static Memory

    Solution:

    Arrays in java are static lists that can store a certain kind of variables. Therefore these arrays need to be initialized at the compile time.


Question: 2 -

Java array is a collection of ________.

Options:
  1. None of these

  2. similar type of elements

  3. heterogeneous data

  4. different type of element

  5. Answer:

    similar type of elements

    Solution not available.

Question: 3 -

At time of array initialization which is necessary to specify?

Options:
  1. Row

  2. Row and Column

  3. None of the above

  4. Column

  5. Answer:

    Row

    Solution:

    Row is necessary to specify at time of array initialization.


Question: 4 -

Index in array start with ______.

Options:
  1. -1

  2. Infinte

  3. 0

  4. 1

  5. Answer:

    0

    Solution:

    Index in array start with 0.


Question: 5 -

Array data access using _____.

Options:
  1. index

  2. Operator

  3. Pointer

  4. Variable

  5. Answer:

    index

    Solution:

    Array data access using index.