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 72.1 repeating as a fraction
how does the dilation affect angle measures
A plane flew a total of 2,220 miles. Its avarage speed was 555 miles per hour. How many hours did the plane fly ?
Rewrite f(x) = 2(x − 1)2 + 3 from vertex form to standard form. f(x) = 2x2 + 5 f(x) = 4x2 − 8x + 7 f(x) = 2x2 + 4x + 5 f(x) = 2x2 − 4x + 5
how do i solve {3x-4y=14 {x+y=-7
What is 9 ten thousands ÷10
Rewrite f(x) = 2(x − 1)2 + 3 from vertex form to standard form. f(x) = 2x2 + 5 f(x) = 4x2 − 8x + 7 f(x) = 2x2 + 4x + 5 f(x) = 2x2 − 4x + 5
A jewelry store received a package of rings that is 16 in long 10 in wide and 12 in high. The package contains 1 in cubes that each holds one ring. How many rin
which is bigger? 3/6 or 4/6
what is the value of 3 in 136,422