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

if the mass is 180g and the volume is 90g what is the density
needles made from animals bones are fossils or artifacts
herando cortes and francisco Pizarro were spanish conquistords
In the Declaration of Independence, Thomas Jefferson listed a series of grievances that colonists had against British rule. What purpose did this serve? The lis
To ensure security, passwords should be A. a combination of letters and numbers. B. hard for you to remember. C. kept near the main computer. D. less than six
solve the equation: Show work step by step -14=-5+3c
_____ occurs at convergent boundaries, where one layer of crust sinks into the asthenosphere when it collides with another layer of crust. Divergence Weathering
Javier rode his bike for a total of 41 minutes. Before lunch, he rode 1 minute less than 5 times the number of minutes he rode after lunch. How many minutes did
Which identifies all the integer solutions of |x| = 17? a. –17 and 17 b. 0 only c. 17 only d. –17 only
what division problem equals 24