Advertisements
Advertisements
Question
Which of the following function finds the size of array char m[] = {'R','A','J','E','N','D','R','A'};?
Options
m.size of (a)
m.elements of (m)
m.length
None
MCQ
Solution
m.length
Explanation:
In Java, you may discover the size or length of an array by calling arrayName.length. So, in this case, m.length returns the size of the array m[], which has eight members.
shaalaa.com
Is there an error in this question or solution?