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 value of the expression?     12.4 + (–2 + 1.6)    A.11  B.12  C.15  D.16
Born as Saul, his name is known as _________ and he spent his entire life after conversion spreading Christianity.
Before scientists learned how to make artificial fertilizers, what key process limited the amount of nitrates available to plants in most ecosystems?
what 3D shape has four triangles and a square
Jaiden is writing a report about the structure of the atom. In her report, she says that the atom has three main parts and two subatomic particles. Do you agree
First president of brazil
Will Central America, by adopting trade pacts such as PPP and CAFTA, trade one form of dependency for another?
What is 0.2 as a whole number?
i need help with math 1010completing the squarex^2-9x=10
What is the difference between 4 twenty five and 3 twenty five