Home > Common Problem > body text

Where does the subscript of the array start?

王林
Release: 2023-01-13 00:29:00
Original
19574 people have browsed it

The subscripts of arrays start from 0. An array is an ordered sequence of elements. The individual variables that make up an array are called components of the array, also called elements of the array, and sometimes called subscript variables. The numeric number used to distinguish the individual elements of an array is called a subscript.

Where does the subscript of the array start?

The operating environment of this article: Windows 10 system, ThinkPad t480 computer.

The subscripts of the array start from 0.

Detailed introduction:

An array (Array) is an ordered sequence of elements. If a limited collection of variables of the same type is named, then the name is the array name. The individual variables that make up an array are called components of the array, also called elements of the array, and sometimes called subscript variables. The numeric number used to distinguish the individual elements of an array is called a subscript.

An array is a form of organizing several elements of the same type in an orderly manner in order to facilitate processing in programming. These ordered collections of similar data elements are called arrays.

Array is a collection used to store multiple data of the same type.

All elements in an array have the same type (this is different from fields in a structure or class, which can be of different types). The elements in an array are stored in a contiguous block of memory and are accessed by index (also unlike fields in structures and classes, which are accessed by name).

Array elements are not only primitive data types, they can also be structures, enumerations or classes.

For more knowledge about computer programming, please visit: Introduction to Programming! !

The above is the detailed content of Where does the subscript of the array start?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template