Learning Summary of C-language pointers and arrays

Source: Internet
Author: User
  1. Arrays consist of a series of identical elements

  2. const int Days "10" = {31, 23, 45, 56, 78,}; the array defined with the const declaration is an array constant, after which it is read-only and cannot be changed in the future, except that it can be re-assigned in the array declaration, and he does not require that the original array be changed. It just means that the function should treat the array as if it were fixed.

  3. If the array is not initialized, the uninitialized space is automatically initialized to 0

  4. int AR "" and int * ar are the same only when declaring formal parameters

  5. c When allocating storage space in the in-place array, a pointer to the first position after the array is also valid

  6. int* pt;*pt = 5 is wrong because when a pointer is created, the system allocates only the memory space used to store the pointer's native.

  7. For the use of form parameter const see C Primer 5 P264 page.

Learning Summary of C-language pointers and 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.