Ask Question
4 November, 01:46

2) What is the value stored in the variable z by the statements below?

int[ ] q = {3, 2, - 2, 4, 7, 0, 1};

int z = q. length;

a) 1

b) 3

c) 6

d) 7

e) None of the above

+1
Answers (1)
  1. 4 November, 03:18
    0
    7

    Explanation:

    Because the q. length is a inbuilt function in the programming which used to get the length of the array. In the array, there are 7 values are store. Therefore, the size 7 store in the variable z.

    For example:

    int[] array={1,2};

    int x = array. length;

    the answer of above code is 2, because the elements present in the array is 2.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “2) What is the value stored in the variable z by the statements below? int[ ] q = {3, 2, - 2, 4, 7, 0, 1}; int z = q. length; a) 1 b) 3 c) ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers