What is the length of an array when its first index is denoted by i and last index is denoted by j?
Show answerHide answer
Correct answer: (C) Length of an array = j − i + 1
Explanation
Indices i, i+1, ..., j contain j − i + 1 elements. For example, indices 0 to 9 give 10 elements.