1.

Which attribute can be used to get the size of an array?(a) Size.Array(b) Array.Size(c) Array_name.length(d) length.Array_nameI had been asked this question during an online interview.This intriguing question originated from Inbuilt Classes in section Inbuilt Classes of Object Oriented Programming

Answer»

Correct ANSWER is (c) Array_name.length

Easy explanation - The array name is given of which the length have to be calculated. The array length is stored in the attribute length. Hence we ACCESS it using dot OPERATOR.



Discussion

No Comment Found

Related InterviewSolutions