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

-8/5 X= 56solvexjgzjfxgkhkufxhxkhxgykxhlxhlx​
What is the topic of this passage? A. hair B. truth C. equality D. cobblers
an artificial reef is intended to affect the ocean ecosystem by​
Just use the picture. I need help asap.
Need Help with Spanish Homework Urgent!!!! Need idea for Spanish ppt: imperfect PROG each conversation needs to have a sort of accident, and a way to resolve th
PLEASE HELP!!! I will give brainliest.
what happens when a low air pressure seytem meets a high air pressure
Someone!! please and thank you
Jocelyn needs to write a 12-page paper for class. If she has already written 4 pages and can write 2 more pages per day, how many days will it take her to finis
20 PTS please help! Why is cell differentiation important in the growth and development of human beings?