Array knowledge points in Linux C notes, linux Array

Source: Internet
Author: User

Array knowledge points in Linux C notes, linux Array

1. One-dimensional array, two-dimensional array, character array.

2. When an array is passed as a parameter to a function, the size of the array cannot be obtained through sizeof. When an array is used as a function parameter, you cannot pass the array parameter itself to tell the function the size of the array when running the program, because the array parameter of the function is equivalent to a pointer pointing to the first element of the array. The efficiency of passing an array to a function is very high, which means that the programmer must use some mechanism to tell the parameter size of the Function Array.

3. The two methods tell the function array parameter size: Pass the array and the value indicating the array size to the function together; introduce a rule to end an array.

4. array_name is the pointer to the first element in the array, and & array_name is the pointer to the entire array. An array is a type. It has three elements: basic type (the type of an array element) and size (except when the array is described as incomplete), the value of the array (the value of the entire array ).

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.