C language entry reference (2), C language entry reference
II. C Language
There are many programming languages, mainly divided into three categories: machine language, assembly language, and advanced language. A computer can only recognize and understand binary code, that is, 0 and 1. Think about how many instruction codes composed of numbers 0 and 1 and their meanings should we remember when developing with machine language? Obviously, this is unreasonable. Such programming is boring, cumbersome, and error-prone. The Assembly Language came into being. The Assembly Language replaces the machine commands with a mnemonic, but it is difficult to remember a large number of mnemonic characters. Therefore, our predecessors have developed advanced languages. Advanced languages are based on natural languages, which greatly reduces the learning cost of programmers and makes programming popular. Currently, advanced languages such as C, C ++, and JAVA are commonly used. However, advanced language reduces the learning cost, but also loses the hardware control capability. The execution efficiency is not just a star in comparison with machine language and assembly language. This tutorial teaches C language. C language is an ancient and powerful language. It originated in 1972 and was designed based on B when developing UNIX operating systems by the Bell Laboratory Dennis LiQi and Ken Thompson, it is 45 years old and the latest C11 standard. C language features both advanced and low-level languages. It is easy to learn and is still highly efficient with low-level languages. It can directly access physical addresses and operate on powerful hardware features. In addition, many advanced languages are extended or derived from the C language. After learning C language, we can learn more quickly when learning other languages. Because of its proximity to the underlying features, we can also learn advanced knowledge such as data structures. The C language can be compared to a very powerful internal method, and it can be used as a universal method. This is also why it remains unchanged. After talking about the advantages of so many C languages, let's talk about its shortcomings. The biggest advantage of C language is its biggest disadvantage-a high degree of freedom. C language programming requirements are not strict, and the degree of freedom of programming is relatively large. In reality, a wave is easy to translate. Due to its free programming, the C language is often hard to detect errors, especially pointer errors. Readers should pay special attention to them.
C language is mainly used for system kernel, hardware driver, embedded single chip microcomputer and other underlying development. We will introduce the C language here, and we will officially start programming below.
Currently, the mainstream operating systems include windows (the largest number of users), Mac OS X (the Apple Computer Operating System), UNIX, and Linux (Linux is a UNIX-like system ). This tutorial focuses on programming in windows.
). The process of converting C code into binary commands is called "Compilation ". Common compilers include gccw.cl.exe and LLVM. In Windows, we generally use cl.exe. the compiler is only responsible for compilation. To write code, we need to use another tool "Text Editor". The author uses notepad ++. Here we also recommend some excellent Text editors Sublime Text and vim. You can choose your preferred Text editor. Some readers may feel that there are many tools to use, right? In fact, we generally use an IDE (integrated development environment) tool when developing software )", IDE integrates compilers, text editors, debuggers, and other tools used during development. I am using Microsoft Visual Studio2013. If I do not like Visual Studio, I am a bloated reader (with a large package and a hard disk, can use dev c ++, C-Free5, VC ++ 6.0 and Other lightweight IDE, the current Computer Level 2 C language examination with VC6.0 more.
If any error occurs in the text, please correct it. It cannot be reproduced without the support of the blogger (not to be continued ......)