¡GoConqr estrena diseño! Cuéntanos qué te parece.

Test

Data Structure Forum Quiz 1

raghu Katagall 25 preguntas

Hacer el test

Este test tiene tiempo límite, así que se abre en el reproductor de siempre.

Preguntas del test (25)

  1. 1Which of these best describes an array?
    1. AA data structure that shows a hierarchical behaviour
    2. BContainer of objects of similar types
    3. CArrays are immutable once initialised
    4. DArray is not a data structure
  2. 2How do you initialize an array in C?
    1. Aint arr[3] = (1,2,3);
    2. Bint arr(3) = {1,2,3};
    3. Cint arr[3] = {1,2,3};
    4. Dint arr(3) = (1,2,3);
  3. 3How do you instantiate an array in Java?
    1. Aint arr[] = new int(3);
    2. Bint arr[];
    3. Cint arr[] = new int[3];
    4. Dint arr() = new int(3);
  4. 4What is the output of the following piece of 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]);
    }
    }
    1. A3 and 5
    2. B5 and 3
    3. C2 and 4
    4. D4 and 2
  5. 5What is the output of the following piece of code?
    public class array
    {
    public static void main(String args[])
    {
    int []arr = {1,2,3,4,5};
    System.out.println(arr[5]);
    }
    }
    1. A4
    2. B5
    3. CArrayIndexOutOfBoundsException
    4. DInavlidInputException
  6. 6When does the ArrayIndexOutOfBoundsException occur?
    1. ACompile-time
    2. BRun-time
    3. CNot an error
    4. DNot an exception at all
  7. 7Which of the following concepts make extensive use of arrays?
    1. ABinary trees
    2. BScheduling of processes
    3. CCaching
    4. DSpatial locality
  8. 8What are the advantages of arrays?
    1. Aa) Objects of mixed data types can be stored
    2. Bb) Elements in an array cannot be sorted
    3. Cc) Index of first element of an array is 1
    4. Dd) Easier to store elements of same data type
  9. 9Assuming int is of 4bytes, what is the size of int arr[15];?
    1. A15
    2. B19
    3. C11
    4. D60
  10. 10Process of inserting an element in stack is called ____________
    1. ACreate
    2. BPush
    3. CEvaluation
    4. DPop

Información

Descripción
Test sobre Data Structure Forum Quiz 1, creado por raghu Katagall el 08/11/2019.
Idioma
English
Visitas
131
Etiquetas
puc
Valoración
Aún sin valoraciones
Valora este test
Valora este test

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?