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

Which statement beat describes how the arrival of horses affect North America
How did Renaissance art change Western Europe?
Using the following image, solve the problems below given that Q is the midpoint of PR.​
Question 3 If AR = 7 and AT = 15, find the length of RT.
Trade-Offs and Trade Work It Out: Assume the economy of Atlantis only produces fish (point F). Calculate the opportunity cost of producing potatoes in 200 pound
A theory has been rigorously tested. True False
We want to study how pH affects the growth of oysters What is the dependent variable: What is the independent variable: Write a hypothesis that you could use to
What occurred in Rome after emperors minted more coins to raise money? The new coins were rejected by the officials. The new coins were rejected by the people.
which region includes almost every type of environment but has to import food to provide enough for the people who live's there PLZZZZZ HELP ME I REALLY NEED IT
True or false Controlled experiments can be randomized or nonrandomized