C language past and present, C language past and present
1. Development of Computer Language
Machine language: it is actually binary 0 and 1. The minimum value is 00000000 and the maximum value is 11111111. the 8-bit bits are 1 byte, 1 k = 1024 byte, 1 m = 1024 k, 1g = 1024 m [first generation]
Assembly Language: in the vernacular, the corresponding letter and word are used to replace the huge machine language [second generation].
Advanced Language: it is also divided into the third generation C, the fourth generation C/C ++, ObjectiveC, the fifth generation of java, php, c #, lua, python, etc.
2. The first helloworld
# Include <stdio. h> // contains the header file, which is used to introduce files dependent on other objects. Angle brackets are available when the dependent files are located in the system file directory. <>, when the dependent file is in the current directory, use the "" int main () // main function. The C Programming portal {printf ("hello world"); // print the function return 0; // return value}
3. C language compilation process
Pre-Compilation: in fact, all the content in the file included in include is copied in. gcc-o hello. I-E hello. c.
Assembly: Compile the pre-compiled file into an assembly language file. gcc-o hello. s-S hello. I
Compile: Compile the Assembly file into a machine language file: gcc-o hello. o-C hello. s
Link: link the dependent third-party library to the compiled machine file to generate the executable file gcc-o hello. s.