Experiment 10--definition and reference of one-dimensional arrays

Source: Internet
Author: User
Tags array definition

First, the knowledge points learned in this lesson

(1), array subscript starting from 0

(2), the array name is an address constant, storing the first address of the array memory space

(3), define the variable name of array explicit array: Type an array group name (array length)

(4), one-dimensional array initialization expression: The general form is the type an array group name (array length) = (initial value table)

(5), reference, define the array, you can use it, C can only initialize the static storage array, static storage array If there is no initial value, the system will automatically assign values to all array elements of 0

Second, the experimental process encountered problems and solutions:

(1), the information is too large, can not be a perfect understanding of what the teacher said

(2), multi-turn books to solve

Third, the experimental experience and the chapter study summary:

So because every day has red song song Day also has the class, the amount ... When there is no class during the day, add to sleep ah =. =, well, I paid my homework seriously.

Array Although the teacher is very clear in class, but, well, forget it is so fast, but turn down the notes and books on the line

Four, preview

Two-dimensional arrays:

(1), two-dimensional array definition form:

Type an array group name [line length] [column length];

(2), a reference to a two-dimensional array to reference two subscripts

The form is: array name [row subscript] [column subscript], row subscript reasonable range [0, row Length-1], column subscript reasonable range [0, column length-1]

(3), two-dimensional array initialization

Method One: Branch assignment initial value general form: Type an array group name [line length] [column length]={{initial value table 0},...,{initial value table K}, ...};

Method Two: Order assignment initial value general form: Type an array group name [line length] [column length]={initial value table};

Experiment 10--definition and reference of one-dimensional arrays

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.