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

(-12)(-3) what is the answer to that?
PLEASE HELP ME Filtering occurs when __________. some light is absorbed and some light is transmitted all light transmitted all light is absorbed light reflects
For each handmade greeting card jacqui sells,she makes a profit of $0.35. In one week,she made a profit of $42. She sell the cards for $0.75 each. A. About ho
Can someone please do number 30.
A track is 200 meters long. How many times must Julius run around the track to run 3 kilometers ?
what number is 0.5% of 8?
what percent of 55 is 34
start at 1000 create a pattern that subtract 8 from each number stop when you have five numbers
Window design. A triangular window on Ross camp's new scary boat has two sides that measure 87 centimeters 64 centimeter, respectively. The perimeter of the tri
what is 0.09 1/10 of what is 0.04 1/10 of what is 0.6 1/10 of what is 0.1 1/10 of