C language compiled array of some add code some not add, what difference

Source: Internet
Author: User
like
Uchar Code table[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f};
And
Uchar ds1302[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f};
Can run, what's the difference between them?
C in the definition of the array is memory space, and code is the meaning of encoding, in the definition of encoding is directly allocated to the program space, compiled code occupies the program storage space rather than memory space.
In some cases, when the defined array contains more elements, the array will occupy a larger amount of storage space, rather than want to affect the memory, and put it into the coding space, to a certain extent, can save memory.
The code in Keil means that the defined variables are stored in the program memory, which is read-only, not writable, and is mainly used to save RAM, and the resources of the embedded system are limited.

C language compiled array of some add code some not add, what difference

Related Article

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.