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 a relation and what makes it different from a function?
Refer to this figure to complete this proportion answers are A) c B) r C) s D) H
what is x ?????????????
what are three observations an astronaut might make while viewing Russia at night
we you noticed a safety hazard what should your first step be
GEOMETRY , FIND THE AREA OF A REGULAR POLYGON!! BRAINLIEST GIVEN!! BOGUS ANSWERS BLOCKED
GEOMETRY TRANSLATIONS!! HELP WILL GIVE BRAINLIEST , BOGUS ANSWERS WILL BE REPORTED!!
According to Benvolio, who is responsible for starting the fight? Check all that apply. servants of the Montagues servants of the Capulets the prince Tybalt Mon
All jobs within the allied health field require this one specific knowledge base. What is this knowledge base? A) Pharmacology B) Medical terminology C) Phlebot
how do i deal with depression 4-5 sentences