Computer Science, asked by rockzzpoornima, 10 months ago

Consider the following code.
int number[ ]=new int[10];



After execution of this statement which of the following are true:

i. number[0] is undefined

ii. number[10] is 0

iii. number[4] is null

iv. number.length is 10


Select one:
i and iv only
iv only
ii and iii only
i and ii only

Answers

Answered by itsshreyas
8

Answer:

iv only is the correct option

Answered by mad210219
4

Number length

Explanation:

iv)Number length is 10

when an array gets initiated and declared

the size gets allocated to the array at the beginning

and all the elements are 0 s if we made equal an entire array into 0

like  :

int arr[10]=0;

it denotes that all elements of the array are zeroes

so here we did not declared to 0

so the size of the array is 10

so here array.length gives 10  

the answer is :

number length is 10

Similar questions