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

which statement about the northern states in the 1780s is accurate
Strawberry plants typically reproduce by making runners, which are miniature versions of themselves, that grow off of the roots and stems of the parent. This ty
According to Polybius, how democratic was the Roman Republic?
How many unique ways are there to arrange the letters in the word DEN?
What is the mapping between an input and an output
How many different 7 place license plates are possible when 3 of the entries are letters and 4 are digits?
what is the answer to 5•(-3)
1. What can you say about a triangle that has exactly one line of symmetry?
the ottoman empire was located in
What is the mass of stem cells produced in the first few days after fertilization called?