Storage links, categories, memory management terminology

Source: Internet
Author: User

The most basic term for C: scope: The range to which the variable can be accessed. It is directly related to the running scope of the code block that the identifier can run. For example, if we define a variable before the main function, then the variable has a file scope, and its access scope is the code definition beginning to the end of the file. This means that you have a file scope.

Block scope: From the beginning of the code request to the end of this function block.

function scope: As long as the goto tag can be accessed, the function identifier is inside the function, and the function end identifier can be accessed.

Translation unit: When a header file contains another header file, the compiler replaces the header file with the # include directive, and the compiler file and all header files are treated as separate files that contain information.

No link: A variable defined within a block scope or function scope is a non-join variable.

External links: Variables can be used in multiple file program scopes;

Internal links: Can only be used in one translation unit.

Automatic variables: With automatic storage age, block scope, and no links.


Storage links, categories, memory management terminology

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.