Aspire's Library

A Place for Latest Exam wise Questions, Videos, Previous Year Papers,
Study Stuff for MCA Examinations - NIMCET

Previous Year Question (PYQs)



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






Solution

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.

Click Here to
View More


Online Test Series,
Information About Examination,
Syllabus, Notification
and More.

Click Here to
View More

Ask Your Question or Put Your Review.

loading...