Most of the most most basic c---construction data type: Common body

Source: Internet
Author: User

Shared body Definition: The structure of the same memory for different variables

General form: Union Common body Name

{

member table columns

} variable table column;

A common body is also a data type

A reference to a common body: a single member variable reference only

Common features: 1. Common body variables the same memory can be used to hold several different types of members, but only one type at a time. That means that only one member works at a moment.

2. the member that is in effect in the common body variable is the last member to be deposited

3. the address of the shared body variable and the address of its member are the same address

4. You cannot assign a value to a shared body variable name, nor can it be initialized in the definition ;


This article is from the "Graduation---Awakening---walk" blog, please be sure to keep this source http://tjy888.blog.51cto.com/5576345/1714413

Most of the most most basic c---construction data type: Common body

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.