Length or number of data element of Array can be obtained from index set by which of the following formulae.
(a) Lower bound − Upper bound − 1
(b) Lower bound − Upper bound + 1
(c) Upper bound − Lower bound + 1
(d) Upper bound + Lower bound − 1
Number of elements in an array is calculated using:
Length = Upper Bound − Lower Bound + 1
Example:
If Lower Bound = 0 and Upper Bound = 9
Length = 9 − 0 + 1 = 10
Correct Answer: (c) Upper bound − Lower bound + 1
Online Test Series, Information About Examination,
Syllabus, Notification
and More.
Online Test Series, Information About Examination,
Syllabus, Notification
and More.