21st Century C Language Tutorial - 1 Advanced

zhaozj2021-02-16  49

Affirming: It is actually very sorry for 9CBS. There is no valuable thing in it. Just try to use the most lightweight text to guide the most idiot. Let's take a look, don't blame the content. If there is any suggestion, send it to mo2mo@163.com

Chapter 1 C Whole (Advanced)

You already know what is program, c is used to write a program. But the code consisting of the English characters (term 1) How does it guide the stupid computer to complete multicolored work?

Terminology 1: The code is in me (wrong is not responsible), it is the text content written by the programming language, and it has become a program in some way.

First of all, you have to know how the computer works. CPU should know what (what? I don't know, this is the content of the computer culture class. I don't know if it doesn't matter, the CPU is equivalent to the human brain). The work of the CPU is done through machine language. CPU can do addition, give memory a location (don't know what is memory, ask the teacher to go) something such a value, but what can be made, what is the order? It is necessary to reach the instruction. Of course, these instructions cannot be used in human language, whether it is English or Chinese. Your name is CPU "plus one" will not have any effect, "increase" is the same. Commands how the CPU work is the machine code. The machine code is a number. A section 01000110111 may be meaningful instructions for the CPU. What is the model of specific machine language, how to write you don't need to understand (want to know? I still learn C and talk about it). CPUs know how to work by reading this data, thereby completing various jobs. Yes, the essence of playing DVD is a bunch of numbers (data) surging around the computer.

What pains are used by digital to write programs. C These high-level languages ​​(you want to say that it is intermediate, it is intermediate, anyway, it is not the low-level language of the hairs, the preparation of the procedure brings great convenience. Once you, you may need to write a large number (machine language) to give a value plus 1, now just use a A = A 1. The familiar mathematical expression and the introduction of the English characters make the writing program easier. However, the code written by C is unaffected for CPU and computers. Just like you use Chinese to speak Chinese in Chinese, he will not understand what you are talking about. There are two kinds in our way, translate themselves with pen, then give foreigners, or ask a translation, you said that he translated a sentence. For advanced languages ​​and machine language, we also have similar means that C uses a technique similar to translation, and things translate the code written with C. And the thing that completed this work is called "compiler", and the process of translation is compiled. Therefore, the final form of the program is still the same, essentially this. What programming language is written in a form, and the ultimate goal is the machine language to be programmed by the CPU.

Note: Why don't I say assembly language? is it necessary? Here is not to test your computer development history. The compiler of C is indeed directly generating machine languages ​​(although some versions are still compiling this PHASE).

转载请注明原文地址:https://www.9cbs.com/read-26611.html

New Post(0)