04-c Language data types

Source: Internet
Author: User

Learning Focus:

  • variables, constants, constant variables, identifiers
  • Basic data types

1. Constants are divided into: integer constants, implementation constants, character constants, string constants, symbolic constants, character constants are divided into: ordinary characters, escape characters.

2. Variable: A variable represents a storage unit with a name and a specific attribute. Has attributes that must be defined first and then used. Variable is a name of the storage address, from the variable value, the actual is to find the corresponding memory address through the variable name, from the storage unit to read data.

3. Constant variables: With the basic properties of the variable, there is a type, the storage unit, but the variable is not allowed to change its value during the existence. A constant variable is a non-variable with a name, which is a invariant without a name.

Definition of constant variable: const float pi=3.1415926;

Definition of Symbolic constants: #define PI 3.1415926;

4. Identifier: In a high-level computer language, a valid sequence of characters used to name variables, symbolic constant names, functions, types, and so on are collectively known as identifiers

Core of programming language: Data type

04-c Language data types

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.