Computer Science, asked by sivakarthik828, 11 months ago

correct statement to access 5th element in a array arr[] of size 50?

Answers

Answered by justin12343
2

Answer:

arr[4]

Explanation:

as array starts with 0

so the first element in array is 0

same goes till the 50 size

so to access 5th element in array we used arr[4]

an extra should always have an extra element. It is left for null element. an array should always have a null element

Answered by ExieFansler
3

Answer:

The correct statement to access 5th element in an array of size 50 is arr[4].

Explanation:

We have an array of size 50 with name arr.As we know the elements of the array are indexed and the indexing start from 0 and ends at size-1.So the first element in an array will be having the index 0 and to access an element in an array the syntax is as following:-

array_name[index];

So to access an element at 5th position the statement is arr[4].

Similar questions