ICSE Class 10 Computer Applications Question 11 of 30

Solved Sample Paper 3 — Question 11

Back to all questions
11
Question

Question 1(xi)

If int arr [] = {3, 5, 7, 9}; what is the value of arr.length?

  1. 3
  2. 5
  3. 4
  4. Cannot be determined
Answer

4

Reason — length property stores the number of elements in an array. Thus, the value of arr.length is 4 as there are 4 elements in the array.