Current location - Training Enrollment Network - Mathematics courses - What is the range of array subscripts? What's the difference between it and the sequence in mathematics?
What is the range of array subscripts? What's the difference between it and the sequence in mathematics?
Arrays are containers for data sets of the same type. Of course, the container has a standard size. How many elements can an array store? Its subscript starts counting from 0, which is not in line with the daily habit of counting from 1 When the subscript exceeds the number of elements in the array minus 1, the array overflows. Computers use virtual memory to manage physical memory. An address maps to a piece of memory. It is illegal to index unmapped memory, and a segment error will occur! The number sequence in mathematics is a series of regular numbers, so don't confuse the concepts. Since learning computer, we should treat computer problems according to the scientific terms of computer, and don't just find a mathematical concept and ignore it.