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

Humans have no impact on the climate. a. True b. False
Frequent scandals during the Harding years damaged his credibility. true or false?
Which early American culture was one source of inspiration for the structure of present-day United States politics?
Which materials are composed of proteins, providing high tensile strength?
The Sun has a diameter of approximately 8.64 × 105 miles. What is this distance in standard form? A. 86,400 miles B. 86,400,000 miles C. 8,640,000 miles D.
In what country did Gandhi work as a lawyer in 1893? New Zealand United States South Africa France
what positons do the earth have to be in for each season
Which soil horizon is located closest to the earth's crust? O horizon A horizon B horizon C horizon
standard form -2.56 x 10 ^3
PLEASE HELP W/ EXPEDITE AND URGENCY! What is the approximate volume of a sphere with a radius of 9 in.? Use 3.14 to approximate pi and express your answer in