a) 0
b) -1
c) 2
d) 1
Answer: a
Explanation: In general, Array Indexing starts from 0. Thus, the index of the first element in an array is 0.
Related Posts
Which of these is not an application of a linked list?
What is the space complexity for deleting a linked list?
What is the time complexity to count the number of elements in the linked list?
What is the time complexity of inserting at the end in dynamic arrays?
Which of the following is not a disadvantage to the usage of array?
What is the space complexity of a linear queue having n elements?
Given an array of size n, let’s assume an element is ‘touched’ if and only if some operation is performed on it(for example, for performing a pop operation the top element is ‘touched’). Now you need to perform Dequeue operation. Each element in the array is touched atleast?
Join The Discussion