Memory, four fields, variable declaration and definition, register, C Embedded Assembly, auto, stack, constant, static variable

Source: Internet
Author: User
Zookeeper

1. Four areas of memory

2. In the program, the variable declaration can have multiple copies, and the definition can only have one copy.

3. The register is in the CPU and there is no address.

4. C language Embedded Assembly Language

5. Auto variable

Automatically allocates memory and releases memory.

6. The stack size is determined by the compiler.

Modify the stack mode, right-click the project, and choose Properties> system> reserved stack size from the context menu.

7. program with no CPU or memory

8. After applying for a space on the stack and assigning a value, the content cannot be released. You need to release the space by using the free method.

9. constant strings are in the code area. The Code area is smart read.

10. Constant nature

10. Differences between static and global variables

A global variables can be used across files

B INTA = 10; equivalent to: Declaration + assignment = Definition

C: The static zone and the program coexist. The static zone allocation takes precedence over the main function.

D: Stack zone: Recycling and releasing.

E: The global variables for static reading are only accessible in this c file.

Extern: declares an externally defined variable.

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.