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

_____ is a concept that describes people's perception of responsibility for the events in their life, and it more specifically refers to whether people tend to
Why did England pass the Proclamation of 1763?
To appeal to a new target market, a maker of coffee has changed the product’s package design, reformulated the coffee, begun advertising price discounts in wome
DeBondt and Thaler (1985) found that the poorest-performing stocks in one time period experienced __________ performance in the following period and that the be
the square root of 28 lies between 5 and 6
A persons decision to take action without being asked is
The _____ problem exists when rivals watch a pioneer's efforts, learn from their successes and missteps, and then enter the market quickly with a comparable or
Juan's cell phone company charges $35 a month for phone service plus $0.50 for each text message. How many text messages does juan send in a month if his bill w
Give the domain and range.
Give the domain and range.