1. Data type
The data type is the type of the variable, and he will decide to store that type of data for that variable;
There are several common types of data:
Shaping (representing integers):
int 4 bytes
Short 2 bytes
Long 4 bytes
Floating point type (for decimals):
Double 8 bytes
Float 4 bytes
Character type (denotes character):
Char 1 bytes
The storage range for each data type is:
Unsigned (positive number only): 0~2^ (bytes *8)-1
Signed (can be expressed plus/minus): -2~ (bytes *8/2) ~2^ (bytes *8/2)-1
2. Arrays
An array is a collection of the same data types;
The Declaration method is: data type variable name [] = {element 1 initialized value, element 2 initialized value ...}; You can also initialize the data type variable name [ array length ] = {0};
When you need to use a member of an array, you can obtain an element of the array by using the variable name [subscript] (an integer that is effectively labeled 0 to the array length-1)
3. Character Manipulation
In c language, the definition of a string is a character array;
The declared method is a char string name [] = "string Content", or char string name [string length] = {0};
If you use the second way of declaring, you can store the character space just as long as the string length-1 (because the string must end with ' \ S ' and occupy one character)
String.h header file, there are some functions related to string manipulation which have copies, comparisons, strings and numeric conversions, etc.
4. Library functions
The library function is the compiler comes with some functions, the use of the need to declare the corresponding header file;
A summary of C language learning