What is the relationship between the maximum subscript of a one dimensional array and the number of

Updated on technology 2024-02-09
7 answers
  1. Anonymous users2024-02-06

    1 Maximum number of subscript elements - 1

    2 Precautions for use:

    Be careful that the array is out of bounds (usually out of bounds, i.e. you have an int a[5), but you operate a[5], a[6], etc.), this is the vast majority of crashes and wrong behaviors of the program**; This is also the introduction of std::vector by stl, and the introduction of std::array by c++0x (tentatively called tr1::

    array).

    3 Upstairs Statement Question:

    About the upper limit: in VS2008, there is no upper limit of the so-called 65536, you new int[100000000]; 100 million INTs are fine.

    Some upper limits are that the space occupied by this array cannot exceed the maximum value of int 0x7fffffff as specified in msdn c2148

    Don't understand what is the direct connection between arrays and stacks.

  2. Anonymous users2024-02-05

    It seems that the subscript value cannot exceed 65536

    It has nothing to do with the number of elements.

    If the subscript value exceeds 65536, the compiler will prompt an error.

    The more elements, the more.

    The slower the calculation.

    They adopt stacks.

    First in, last out.

    The number of arrays is too large, resulting in a large memory occupation.

    No matter what you want, there will be a degree.

    Thank you Number of subscripts = number of elements.

    Maximum subscript for Number of Elements = Number of Elements - 1

    The initial value of the subscript starts at 0.

    That is to say: a[5];

    Subscript value = 5 number of elements = 5;

    Subscript values are arranged:

    a[0],a[1],a[2],a[3],a[4];

    That's right.

    I'll give you a ** to verify:

    #include

    #include

    int main(void){

    char a[65535];

    int i=500;

    while(i<10000){

    sound(i+=500);

    delay(500);

    printf("C language Maximum number of subscripts: 65535 When the array exceeds 65535, the c compiler will not compile");

    system("pause");

    return 0;

    I'll take a look tomorrow.

    The subscript 1 * subscript 2 of the 2-dimensional array < = 65535 is placed in VS2008

    Its compiler has changed.

    There is no limit to the size of the subscript, as long as you have a large memory.

  3. Anonymous users2024-02-04

    a.That's right. b.Mistakenly misinformed.

    Correct answer to the rest of the case: type cover roll a

  4. Anonymous users2024-02-03

    Summary. If the elements in the array are also arrays, the array is a multidimensional array (or nested array). If the elements in the array are also arrays, then multidimensional arrays (also called nested arrays) can be formed.

    For example: let arr = 1, 2, 3], 4, 5, [6, 7]],8, [9, 10, [11, 12]]]arr is a three-dimensional array consisting of several two-dimensional arrays and one-dimensional arrays, where the second element [4, 5, [6, 7]] is a one-dimensional array of three elements and a two-dimensional array of two elements.

    24. +If the elements in the array are all one-dimensional arrays, then the array is +.

    Hello Answer: 24, + If the elements in the array are one-dimensional arrays, then the array is +. The array is a two-dimensional array.

    If each element in the array is a one-dimensional array, then the entire array can be regarded as a large array containing multiple one-dimensional arrays, so it can be called a two-dimensional array.

    If the blind segment element in the array is also an array, the array is a multidimensional array (or nested array). If the elements in the array are also arrays, then multidimensional digital fiber groups (also called nested arrays) can be formed. For example:

    let arr = 1, 2, 3], 4, 5, [6, 7]],8, [9, 10, [11, 12]]]arr is a three-dimensional array consisting of several two-dimensional arrays and one-dimensional arrays, where the second element [4, 5, [6, 7]] is a one-dimensional array of three elements and a two-dimensional array of two elements.

  5. Anonymous users2024-02-02

    When referencing an array, the subscript of the array starts at 0, and the maximum subscript value of the array is the length of the array minus 1.

  6. Anonymous users2024-02-01

    When the array size is n, the array subscript range is:

    0~n-1

  7. Anonymous users2024-01-31

    1. When defining a one-dimensional array, you can omit the length of the array (wrong).

    2. The subscript of the array starts from 0. (Right).

Related questions
13 answers2024-02-09

When x+6=2k-2, i.e., x=2k-2 3, the maximum value of y=1-2sin(x+6) is: 3 >>>More

7 answers2024-02-09

It can be upgraded to avoid unnecessary repetitive operations.

9 answers2024-02-09

b Interpretation: "Spring breeze" refers to the "summer monsoon" in climatology, which is the warm and humid southerly air flow blowing from the ocean. >>>More

5 answers2024-02-09

I don't know, probably on time administrative village said.

44 answers2024-02-09

Feelings are inherently inherently incapable of being considered with rational thinking. There are several possibilities for a man to be in a relationship with a woman. >>>More