Computer Science, asked by affanfarook24061, 4 months ago

What is the difference between size of the array and index of an array?

Answers

Answered by nehabhosale454
4

Answer:

Indexing is done in order to access a specific group or individual array elements.

Consider an array called person[n]. There are n number of elements in an array. Its otherwise called as size of array. n may be any positive number.

For example n = 10 means there are 10 elements in the array ( persons in this case ). So the size of array is 10.

Person[0] = kalaiselvan

Person[1] = karthick

Person[0] represents the first element in the array. This is called indexing, as we are using an index number to address an element.

Etc and so on. Note that the array index starts from 0. So the maximum index is n-1.

Similar questions