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 photosynthesis
What will be the formula and electron dot structure of cyclopentane?
Although Ernie could see Alfonso’s desperation, he had plans with his friend Raymundo. They were going to catch frogs at the Mayfair canal. What type of transit
La maison es un mercado al aire libre. cierto falso la maison vende ropa muy elegante y nueva. cierto falso guido asenjo puebla dise?a (designs) ropa y también
The position of a topic sentence often shifts, according to the author and writing style. Where is one place the topic sentence should never be?
Which one is it A. B. C. or D.
What is the true solution to the logarithmic equation below? log2(6x)-log2(sqrtX)=2 A, x=0 B x=2/9 C. x=4/9 D. x=2/3
which one is it A. B. C. or D.
Radioactive isotopes called ____ can be used to detect some medical problems.
what is the solution set of the equation (x -2) (x-a) = 0 ?