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

What is the equivalent expression for -r+8(-5r-2)?​
ill give u brainliest ;) Las muchachas __________ mucho. Select one: a. sacamos buenas notas b. toca el piano c. hablan por teléfono d. estudio historia
Find arc AB. Show work
Kinda struggling need help find the answer X^2+6x-72=0
define dml and ddl with examples​
match the eating disorder to the description of that disorder ​
Explain what an individual would have to have genetically to show the recessive trait
We have debate and my friends want me to bring for them point. What is importance of talent? I need some points 6 lines or 7
The triangles are similar. Show how they are similar and justify your answer. Is the dilation an enlargement or a deduction? How do you know? What is the scale
After saving money in her piggy bank for three years, Beverly decided to deposit $5,000 of the money in the Millertown Bank. If the bank were fully loaned out a