Constants and variables

Source: Internet
Author: User

1. Constants

(1) Integral type constant

100,23,33 and so on;

(2) Real-type constants

2.1,34.7, etc.

(3) Character constants

Ordinary characters such as ' A ', ' a ', and escape characters

(4) String constants

"ABC", "342" and so on

(5) Symbolic constants

#define PI 3.141592

2. Variables

int a,b,c;

3, constant variable (C 99 allows the use of constant variables)

const int a=3; Indicates that a is defined as an integer variable, specifying its value to be 3, and its value cannot be changed during the existence of a variable.

4. Identifiers

Constants and variables

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.