What's the best way to learn C language? The master asked the great god for help.
Learning any knowledge step by step is always the best way. Unfortunately, many people know this truth, but they always want to take the so-called shortcut. If you are a middle school student who has just started learning programming, or an undergraduate who has just entered the Computer College, or a beginner who is determined to make a difference in the computer field, you must be eager to know where to start learning computer technology. My suggestions are: math, English, C language. I don't need to emphasize the importance of mathematics and English. You may have been learning them since kindergarten. Please always put them in the most important position, whether you learn computer or not. Why is C language so important? Let's talk about learning methods first. What is described in books is difficult to be thoroughly digested and absorbed without our personal practice. The principle of computer composition explains the format of floating-point numbers. If we can see and analyze the representation of floating-point numbers in memory or registers, it is 1000 times stronger than pure theory. Data structures and algorithms seem difficult. If you can realize the examples in the book and then finish the exercises, you can also become an algorithm master just by eating a good book. In fact, the operating system principle is not just a principle, only by doing some kernel experiments can we really understand it deeply; There are many trendy technologies, such as JavaEE, PHP, Ajax, Net, etc. Many experts need only a short time to learn these technologies. Needless to say, they must be experts in C language. C language is a general tool for almost all computer technologies, including various basic theories of computers. Don't set foot in the computer field without the determination to master C language. Why is it C, not C++, not Java, not something else? Because c language is the simplest. You need to master a language tool, but you may not need a lot of concepts such as "object-oriented", "template" and "function overload". C language is low enough, very, very close to the bottom structure of the computer, and won't let you get lost in Wang Yang's concept ocean. C language has no real difficulty except "pointer", which is the key to understand the nature of the underlying structure of the computer. Don't think about what you should learn. You will know what to do next when you master C. If you are interested in the inside of the operating system, you can try to study the Unix kernel. Besides C language, you also need some knowledge of assembly language and protection mode. If you are interested in algorithms, congratulations, C language is enough; If you are interested in Windows programming, go and see Windows programming. The author clearly tells you that "only the foundation of C language is needed". If you are interested in any other language, learn it, but I suggest learning C++ first, because you need some "object-oriented" knowledge. Learning C language is not a one-off event, but it cannot be mastered in ten years. How to learn and master C language at the least cost is the theme of this paper. Please note that even the "minimum cost" is by no means a shortcut, but to get the maximum benefit in the shortest time, which also means that you need to go through a hard process. First, read a good book, or you might as well not read it. The first problem that all beginners face is: how to choose teaching materials. A good beginning is half the battle, and choosing an excellent textbook is the key factor to get twice the result with half the effort. Unfortunately, schools usually assign you a poor C language textbook. Fortunately, you can choose again. Tan Haoqiang, a famous professor, published a book "Programming in C Language", which is said to have a circulation of over 4 million copies. As far as I know, many schools will recommend this book as a C language textbook. Although my name (Tan Haoyu) is only one word short of the professor, I am extremely determined to hack his book. This book is not written for students majoring in computer science, but for students of other majors who need to take the computer grade examination. The main shortcomings of this book are: the sample program is very unprofessional and can't teach you the way of thinking that programming should master; The program style is quite bad, which will make you develop the bad habit of scribbling code; There are too many mistakes. Someone pointed out hundreds of mistakes in this book, including many key conceptual mistakes. Well, I don't want to say too much about this book. If you are interested, you can have a look at Baidu:) Kernighan and Ritchie's C programming languages are classic, but many contents of the old version are out of date, which is far from the current standard C language. Be sure to read the latest version, or you might as well not read it. In addition, even the most classic and authoritative books can't cover everything, so it is necessary to keep a C language reference manual at hand. C language reference manual is the C reference manual, which is a detailed description of C language standards, including most details of C standard library functions, and can be regarded as the best reference book for standard C language. By the way, the latest C programming language is revised according to the C89 standard, while the C language reference manual describes the C99 standard. There may be some discrepancies, so it is recommended to study according to the C99 standard. There is also a book, C and the Pointer, which is also quite well written. The English name is "Pointers on C", which particularly emphasizes the importance of pointers, which is a major feature of this book. However, this book is not suitable for beginners. If you have studied C language and have some basic knowledge of C language, but it is not very solid, then you can try this book. I believe that as long as you understand the pointer, C language will no longer be mysterious. If you have finished a C language textbook and want to go further, there are two books you must read. The first book is c trap and trap, a very thin booklet with very interesting content. It should be noted that this book was written more than 20 years ago, and many defects of C language mentioned in it have been improved, but it is not a bad thing to know some history. Then you can challenge the expert C programming. As the name implies, this book is quite difficult. Once you read it carefully and understand it thoroughly, you can safely write "Mastering C Language" on your resume. Remember a principle, don't read books you don't understand at present, it's a waste of life. If you don't understand it, you must be missing some necessary basic knowledge. At this point, you should carefully analyze what you need to add, and then go to the bookstore to find books about these contents. Only by making up the basic knowledge and coming back to study can we really get twice the result with half the effort.