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 tom spins the spinner 80 times work out an estimate for the number of times the spinner will land on 3 please help me
solve the following 3√64
1/3x+4=10 What is x?
solve the equation (X-1) (2x+5)=0​
describe some people in the crowd present at public event
y varies inversely with x. If y = 13 and k (the constant of variation) = 156, what is x?Round to the nearest whole number, if necessary.​
Hemophilia is a sex-linked recessive trait in humans. If a father and a son are both hemophiliacs, but the mother is normal, her genotype must be____. (Note: th
TRUE OR FALSE? The equation of a line with slope m = -3 and including point (5, 5) is y = -3x + 20.
En relación a la escala de ph se puede decir lo siguiente: I. Mientras más cerca del 8 la sustancia es más básica II. El papel tornasol es un papel indicador, q
What is the equation of the line perpendicular to Y-3x+1 that passes through the point (12,-6)? y=x+1 3x + 2y = 24 3x + 2y = 6 2x - 3y = 42 2x - 3y = -48 Help p