1. #import function: Import the header file;
2. There are two forms of the import header file: <>, ""
<> role: Import system framework
"Role: Import files that others have written."
3. Data type Specifies the type and size of the data;4. Integral type:(1). type int: 4 bytes; (2). Short Type: occupies 2 bytes; (3). Char type: 2 bytes; (4). Long: 64-bit system occupies 8 bytes; The 32-bit system occupies 4 bytes.
' 0 ' character 0 corresponds to decimal integer 48
0 Digit Zero
' 0 '---' 9 ' corresponds to 48--57
' A '--' Z ' corresponds to 65--90
' A '--' z ' corresponds to 97--122
' a ' + = = ' a '
5. Float Type:
(1) Single-precision floating-point type: float is 4 bytes;
(2) Double-precision floating-point type: Double is 8 bytes.
Constant: Amount not to be changed without external force
Integer constants: 89 88 6 ...;
Floating-point constants: 3.1415926 12.01 ...;
Character-type constants: ' A ' 0 ' B ' ...;
Definition of variable: data type variable name = initial value;
The variable definition must be assigned the initial value;
Naming rules for variable names:
1. Consists of numbers, letters, underscores, and numbers cannot begin;
2. Cannot be duplicate with other keywords;
3. Cannot duplicate the name of other variable names;
4. See the name of the Italian.
6. operators:
Assignment operator: "=", assigns the value to the right of the equal sign to the left variable, the process of assigning the value is the process of copying,
Copies a copy of the value to the right of the equal sign to the variable to the left of the equals sign.
Arithmetic operators: "+", "-", "*", "/", "%", "+ +", "-"
Note : + + or--before, the first self-increment (minus), then use, + + or--after the first use, in the self-increment (minus ).
Compound operator:+=,-=,*=,/=,%=
7. expression: Can be made up of constants, variables, and operators
How to tell if it is an expression: there is no value
Statement: With a semicolon ";" End
8. Format output function printf: The output of the target, is to verify that the results are correct
Conversion character
%d--INT
%HD--Short
%ld--long
%f--floating-point type (float,double)
%c-char
Escape character: \ n Enter, percent output%,\\ output \
C Language First speaking: C Foundation