Current location - Recipe Complete Network - Complete cookbook of home-style dishes - Seeking programming methods
Seeking programming methods
1. Learn C well, and any programming tool can control it freely.

2. Be sure to practice more on the computer and learn relevant knowledge through the program. After repeated several times, a positive result was obtained.

Don't regard learning C as a task, let alone a difficult task. Be confident that anyone with normal intelligence can learn C well. Always keep the mentality of the game and have more fun. When you find programming interesting, you will have a bright future in the computer field.

4. If a program can't figure it out for a while, and finally put it on hold for a while, you may realize the truth from other programs after a while.

5.c language is a whole, and all aspects are organically related. We should grasp it as a whole and not divide it into irrelevant parts.

6. Don't completely trust the textbook (including this handout). All conclusions are best verified by computer.

Simply put, programming is the process of using a programming language, with the help of a computer, to write a program code to achieve a certain purpose or solve a certain problem, and finally get the result.

Although the computer is very powerful. It can be used for you to surf the Internet, play games and manage the company's personnel relations. But without a program, it is equivalent to a pile of scrap iron and will not pay attention to the "orders" we give it. Therefore, we can only tame it in one way-program, which is the only way for us to communicate with computers.

What exactly is the procedure?

A program is a collection of instructions that tell a computer how to perform a special task.

For example, it is like guiding you to make a menu, or directing a traffic policeman (or a traffic sign) to drive all the way to the destination. Without these special instructions, the expected task will not be carried out. So is the computer. When you want a computer to do something for you, the computer itself can't actively work for us, so we have to give it instructions, and it can't and can't understand the description of things in human natural language at all, so we have to tell the computer what to do and how to do it with programs. Even the simplest tasks need instructions, such as how to get keystrokes, how to put a letter on the screen, how to save files on disk, and so on.

So much trouble, even programming these things should be considered! No wonder some people say that programming is so difficult! You are wrong. In fact, many of these instructions are ready-made, contained in the processing chip and embedded in the operating system, so we don't have to worry about their work. It's all done by the processor and the operating system, and we don't need to get involved in these processes.

The computer mentioned above will not do anything on its own initiative. Therefore, we should make the computer "serve" for us through the program. And this process is made up by ourselves. Programming can be realized by using a programming language, and what the computer is required to do is described according to the grammar of this language.

The grammar we are talking about here is completely different from that in a foreign language. The grammar we are talking about here is just reading your program and writing rules.

After writing the program, special software will interpret or translate your program into a "computer language" that the computer can recognize, and then the computer can "understand" your words and do things according to your instructions. So programming is actually a process of "people making rules for computers".

There are many kinds of computer languages, which can be generally divided into three categories: machine language, assembly language and high-level language.

Every action and step of a computer is carried out according to a program written in computer language. A program is a collection of instructions that a computer needs to execute. All programs are written in the language we have mastered. Therefore, if people want to control the computer, they must send commands to the computer through computer language.

The only language that a computer can recognize is machine language, that is, machine language. But usually people don't use machine language when programming, because it is very difficult to remember and recognize.

At present, there are two general programming languages: assembly language and high-level language.

The essence of assembly language is the same as that of machine language, which operates directly on the hardware, but the instructions use English abbreviations and identifiers, which are easier to identify and remember. It also requires programmers to write out each specific operation in the form of commands.

Each instruction of the assembler can only correspond to a very subtle action in the actual operation process, such as moving, self-increasing, etc. Therefore, the assembly source program is generally lengthy, complex and error-prone, and programming in assembly language requires more computer expertise, but the advantages of assembly language are obvious. The operations that assembly language can accomplish are not realized by ordinary high-level languages, and the executable files generated by source programs are not only small, but also very fast.

Advanced language is the choice of most programmers at present. Compared with assembly language, it not only synthesizes many related machine instructions into one instruction, but also removes details related to specific operations but not related to the completion of work, such as using stacks and registers, which greatly simplifies the instructions in the program. Because many details are omitted, programmers don't need much professional knowledge.