thatcooldude1908 thatcooldude1908
  • 04-07-2019
  • Computers and Technology
contestada

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

Respuesta :

PhantomWisdom PhantomWisdom
  • 12-07-2019

Answer:

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.

 

Answer Link

Otras preguntas

how many feet does 5 yards equal
Which primary source document would give you insight into how the Great Chicago Fire affected working-class families?
How did the issue of slavery divide the union
In the Southern subregion of sub-Saharan Africa, which country is mainly covered by the Kalahari Desert?
example of A function whose domain is [2, infinity]
What was the structure of authority within the new factories in the industrial revolution?
Which are characteristics of trade in ancient Egypt? Choose all answers that are correct. A. Egypt had its own silver and gem mining. B. Traders came and went u
Amphibians can breathe through their skin. True False
When solving a word problem, what step should you always do after reading the problem, but prior to writing the equation?
The IMF and World Bank have been criticized as undemocratic. Why?