C Data Type

Source: Internet
Author: User

Zookeeper

In C language, data types can be divided into four categories: basic type, construction type, pointer type, and null type.

  • Basic type: the primary feature of a basic data type is that its values cannot be decomposed into other types. That is to say, the basic data type is the most basic type.

  • Constructor type: the constructor type is defined based on one or more defined data types. That is to say, the value of a construction type can be divided into several "members" or "elements ". Each "member" is a basic data type or a constructor type. In C, there are several types of constructor: array type, struct type, and shared object (union) type.

  • Pointer type: A pointer is a special and important data type. The value indicates the address of a variable in the internal memory. We use the pointer type to access the data pointed to by the pointer.

  • Null type: when calling a function value, a function value is usually returned to the caller. The returned function value has a certain data type and should be described in the function definition and function description. For example, in the max function definition, the function header is int max (int x, int y). The "int" type specifier indicates that the return value of the function is an integer. Another example is that you do not need to return the function value to the caller after calling void printf_hello (). This function can be defined as "null type ". Its type description is void.


  • 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.