The data type of the Azusa C language learning note
First, the integral type
1. Character Char 1 byte 8bit
2. Short integer 2 byte 16bit
3. Long Integer 4 byte 32bit
4. Integer int is 4 bytes under 32-bit system, 2 bytes under 16-bit system
Second, the real type
1. Single-precision float 4-byte 32bit 7-bit valid digits
2. Double 8 byte 64bit 16-bit valid digits
3. Available in exponential form, such as: 2.1E5 (2.1*10^5)
4. The system defaults to type double if no f is added
5.C language system fixed format output only six digits after the decimal point, such as to output eight-bit write%0.8f, such as write%8f the width before the decimal point is 8
6. Automatic type conversion to maintain precision, the system automatically converts to multibyte type, signed and unsigned automatically to the unsigned conversion
7. When assigning the right type to the left type (such as Integer type processing, only the low eight-bit participation operation)
Third, the storage type of the variable
Auto Auto variable----infrequently used
Register Register variable----infrequently used
extern referencing external variables
Static statically variable
Const read-only variable, value cannot be changed
Iv. Other
typedef type REDEFINED as: typedef unsigned char U8
Negative number is the complement of positive number (take counter plus 1)
Shift left: high overflow, low fill 0
Symbol right shift high fill sign bit, low overflow. such as-1 (11111111), shift right OR-1
Monocular operator: single-target operator, such as ++,--
Binocular operators: Two-target operators, such as +,-,*,/
Linux features: tree-like file structure, all files
/root Path
/bin system binary file path (executable file)
/Boot System boot path
/dev Device files
/etc System configuration file
/home path, user directory
/lib Library file
/lost+found Backup Files
/media Media files
/MNT Mounting files
/usr user binaries, libraries and other files
command./current path: Previous level Path ~ User Home Path-Previous path > output redirection
PWD Display path mkdir Create directory touch Create file cat display file
Find search files Find/-name sources.list
grep Find File contents grep print/usr-n-R
gzip Compressed tar zcvf bk.tar.gz tt.c Plus-C Specify directory unzip tar zxvf bk.tar.gz
VI Editor
I key, insert mode
ESC key, edit mode yy copy P paste u undo dd cut/Find
shift+: Command mode W save Q exit
\p< inserting #include<>
\im inserting the main () function
\ip inserting the printf () function
The data type of the Azusa C language learning note