Home > front end >  in terms of arrays in data structure, what "Location of next index depends on the data type we
in terms of arrays in data structure, what "Location of next index depends on the data type we

Time:08-02

I am not new to programming, and I can easily work with arrays. But English is not my first language. I was reviewing data structure from the beginning on GeeksForGeeks website; and I found this sentence which I could not understand it. It says "Location of next index depends on the data type we use". May you explain more. Feel free to suggest any correction.

CodePudding user response:

The amount of memory required at each index of a given array may be too great to be contained in a single memory location. Data larger than a single byte may be stored in a sequence of consecutive memory addresses.

CodePudding user response:

What I have understood is that the location in the memory of the next index depends on the datatype. For example, from GeeksForGeeks website,

enter image description here

Here it is used characters and the locations are 200, 201, 202...etc represent the location in the memory. but if it used another datatype the numbers 200, 201, 202...etc would be different.

  • Related