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

We read the word de55ert as 'dessert' rather easily, even though it is grossly misspelled with the number '5' in place of the letter 's' twice. this influence o
Who designates the incident commander and the process for transferring command?
What is the definition of Mutualism
Find BC. Round to the nearest tenth. A. 19.1 B. 20.8 C. 23.1 D. 23.3
Which graph represents the function f(x)=−2x−1 ?
In a survey, 17 high school graduates and 16 non-graduates were asked a qiestion.
This graph represents what piecewise function?
"those who reject the early elected caliphs are the"
Light acts like? a particle only. both a wave and a particle. a wave only. neither a wave nor a particle.
Which type of exocrine gland accumulates its secretory product in the cytosol of its cells until the cell ruptures and becomes part of the secretory product? ho