Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - Define a one-dimensional array?
Define a one-dimensional array?
In C language, one-dimensional array is defined as follows:

Type descriptor array name [number of elements]

Among them, the type name determines the data types of all elements, and the number of elements gives the number of variables to be included in the array. It can be in the form of an expression, but only variable constants and operators can appear in the expression.

Common types: zhichar, int, long. Floating, double precision.

The general representation of array elements is:

Array name [subscript]

Among them, the subscript can be an expression, but it must be an integer with a certain value, ranging from version 0 to the number of elements-1.

Note: Do not use out-of-bounds subscripts when referencing array elements, because the system will not report an error when compiling this situation, so pay special attention when writing programs.