Game Preview

MCQ Revision

  •  English    18     Public
    Grade 10
  •   Study   Slideshow
  • What is the highest index of any array with 100 elements?
    99
  •  10
  • Calculate the total memory (in bytes) required to store a double array of size 6.
    48
  •  10
  • The java statement System. out. println(x[x. length]) results in:
    run time error
  •  10
  • Assertion :An array can store elements of different data types. Reason: An array is a user-defined data type with multiple values of the same data type but a different memory index.
    Assertion is false, Reason is true.
  •  10
  • char ch[ ] = {‘X’, ‘Y’, ‘Z’, ‘W’}; System.out.print(ch[0] + 50);
    138
  •  10
  • The ith element in the array has an index _________
    i-1
  •  10
  • What is the output of the following code segment in Java? int[] array = {1, 2, 3}; System.out.println(array[3]);;
    Error : ArrayOutofBound
  •  10
  • What will be the output of the following code snippet? int[] arr = {1, 2, 3, 4, 5}; System.out.println(arr.length);
    5
  •  10
  • True or False: The size of an array can be changed after declaration.
    False
  •  10
  • Write the syntax to initialize an array with values 10, 20, 30.
    int a [ ] = {10,20,30}
  •  10
  • True or False : Linear Search is faster then Binary Search
    False
  •  10
  • Which searching technic required sorted array.
    Binary Searching
  •  10
  • What is the output of arr[arr.length - 1]? (If arr = {2, 4, 6, 8})
    8
  •  10
  • What will arr[2][1] return if arr = {{1,2}, {3,4}, {5,6}}?
    6
  •  10
  • How many total elements are there in int[3][4]
    12
  •  10
  • What is the index of the last row in int[5][3]?
    4
  •  10