How to Learn programming C Language

Source: Internet
Author: User
Tags map data structure
How to Learn programming C Language

I. How to learn C Language

Many people have no idea how to learn C language. They often ask me the same question: how to learn C language? I am a college student and have been developing programs for many years. Like many people who have just started, the first computer language I learned is C language. After years of development, I have deeply realized how important C language is to a program designer. If you do not understand C language, it is almost ridiculous to write the underlying program, you want to write excellent and efficient programs. Why is C language so important?

First, the C language syntax structure is very concise and exquisite, and the program written is also very efficient and easy to describe the algorithm. Most programmers are willing to use the C language to describe the algorithm itself, if you want to make some achievements in programming, you must learn it.

Second, the C language allows you to go deep into the underlying system. Which of the operating systems you know is not written in the C language? All windows, Unix, Linux, Mac, OS/2 are inside and outside. If you do not understand C language, how can you go deep into these operating systems? Let alone write their kernel programs.

Third: many new languages are derived from C, C ++, Java, C #, J #, perl... which one is not? After mastering the C language, you can master many languages. After simple learning, you can use these new languages for development, once again, the C language is an important foundation for programming. Another point: Even if you are recruiting programmers and taking tests in C language, you must master the C language if you want to join the it industry.

So how to learn C language?

1: To do good things, you must first sharpen the tool.
Here we will introduce several essential things for learning C language:
A development environment, such as turbo C 2.0, has occupied more than half of the development programs in the DOS era. However, in the windows era, it is difficult to use turbo C. It is difficult to edit the program and drag and drop the program. In addition, the function variable auto-sensing function is not available, and it is not convenient to query reference materials. We recommend that you use Visual C ++. Although this is a big part, once it is installed, it is very convenient to use.
A learning tutorial, now the C language teaching materials such as Ox hair, but we recommend that you use "C language programming" Tan haoqiang editor of the second edition of Tsinghua University Press, this book is very suitable for beginners, And the content is also very refined.
In addition, there are a lot of auxiliary learning software. After all, it is now in the Window era. Learning Software is as old as learning. I would like to recommend an integrated learning environment (C Language), which provides excellent knowledge points and routine explanations, as well as a test environment for question libraries. It is said that there are thousands of questions, there is even a windows trubo C. Beginners can practice programming without having to install other compilers. It is very suitable for beginners. There is also a "C Language Learning System" software, but it is just a question bank system. If you think the question is not enough, you can try it.

2: sunflower collection
What is the best way to learn computer languages? Answer: Read the program.
That's right. Reading a program is the fastest and best way to get started with C language. Like me, now I want to learn other languages such as J # And C #, instead of reading books one by one, but learning their routines. Of course, for beginners who have never learned any computer language, it is best to read the tutorial first. After learning each chapter, you must carefully understand all the concepts of this chapter, then let alone all the routines mentioned in this chapter, and then carefully study the program until each line understands, and then find a few programming questions, preferably similar or the same as the routine, if you try to write a program that you already understand, you can write a program that is the same as it. It is definitely not necessarily true. If you don't believe it, just give it a try, if you can't write it out, don't worry. Go back and study the routine again, think about why you can't write it out, and then write the program again and again until you get it done. Congratulations, you are getting started.

3: reaching the peak
The highest level of writing a program is to master various methods (data structures) for solving problems and methods (algorithms ).
Is writing the underlying program a good programmer? Also, writing underlying programs is nothing more than mastering the hardware structure. Besides, the hardware and hardware are different. To write a driver for a chip, it is nothing more than mastering the various registers and combinations of the chip, then write the value to read the value. That's all. This is just getting familiar with some io functions. So how can we be proficient in programming? How can we be proficient in programming? For example, if you have 10 people in front of you and find someone named "Zhang San", what should you do? Method 1: Ask the 10 people directly: "Who is Zhang San ". 2nd Methods: You asked one by one, "Are you James ?", This person is James. Method 3: Ask a person one by one, "you don't know John, tell me ". Don't underestimate this question. Of course you will choose the first method. Yes, you are correct, because this method is the fastest and most efficient, however, finding the best way to solve the problem in programming and the means you use are an important sign of testing a programmer's programming level, and it is not easy to achieve. This problem is similar to the Map data structure in data structures and algorithms. Therefore, mastering the data structure and some common algorithms is an inevitable path to success. At last, we recommend Yan Wenmin's "Data Structure" Tsinghua University Press. I hope everyone who wants to become a programmer can study this book. [EDIT: Zhao jinjun]

Ii. Language Learning Methods

Let's talk about our learning methods!
You can learn either way or not. But if someone else learned it in one month, but you did not learn it in 100, isn't it too late? :) So we should pay attention to methods for learning. The learning method is correct and get twice the result with half the effort.

What is the shortcut to learning C language? My answer is reading a book. The book is written by the first ten years of experience. Reading ten books is equivalent to learning the skills of the previous ten years. Then, your internal skills will rapidly increase by 1. :) Of course, books should read good books. Only good books are nutritious. If it takes you one day to read a broken book, and the knowledge introduced in this book is completely new to you, but due to improper organization or insufficient depth, it makes you get little nutrition, and it's better to study it for a day. This kind of book is not worth reading. What are the good books to learn C language? I think the basic books should be well read first, for example, four books and five classics in C language. (Although many of these books are out of print, I believe that the electronic version is also very beneficial. Besides, if you really want to see it, I believe you can do it .) You will read these books in a short period of time (for example, a month or two), depending on your foundation and understanding. What about those books? I 'd like to list a few more. Bjarne stroustrup's "C ++ programming language" (The C ++ Programming Language) must be viewed. This book defines some basic concepts of C, it is more comprehensive than any other C language book I have ever seen. Bjarne stroustrup's design and evolution of C ++ language (THE DESIGN AND EVOLUTION OF C ++) and David R. hanson's C language interface and technology for creating reusable software (C interfaces and implaementations techniques for creating reusable software) must look, these two books describe how to use C to handle exceptions, encapsulate and expand implementation types, and other advanced technologies that are frequently used in large projects. Other Books, operating systems, compilation principles, algorithms, and modes. Reading a book is so powerful as coding. All in all, just like the cloud in "Biography": "The person who is born and knows, also the person who learns and knows, and the second who is sleepy and learns ." We cannot always learn it because of our difficulties, but we need to be able to continue without any changes.
Reading a book is a Learning Guide. The book can clearly introduce concepts, but the book cannot introduce the details of the application to you one by one, because the application is always complicated and changeable. Therefore, we need to be familiar with the tricks, understand how to use them in the book, and read the source code more. When Linus answers questions to others, it is often said to read the *** ing source code; Hou Jie also mentioned in his article that "there is no secret before the source code ." This is the rumor of the master. The source code is like an animation, just like a slide. Let's show you the tricks in the book. It can be said that the experience of experts is mostly from code. The source code is the same as the book. It should also be good. Here, we recommend that you refer to Linux kernel source code and Linux TCP/IP source code. These two sets of code are both open-source and easy to use. In addition, it can work with Andrew S. tanenbaum's operating systems: design and implementation, Mao decao Hu Ximing's Linux kernel source code scenario analysis, Jonathan Corbet, Alessandro Rubini, the Linux Device Driver (3e. richard Steven s "TCP/IP details (3)" (TCP/IP multicast stracted), W. richard Steven s advanced programming in the Unix environment, the new version adds the content of Linux kernel) and other books, it is very convenient, of course, the program is not seen, is written. When I was in high school, I insisted on writing a program for six hours every day. Data Structure, arrangement and combination, and graph theory exercises were repeatedly performed n times. Although it has been two years since now, a lot of content has been forgotten, but it has developed my strong coding and debugging capabilities, and it is still very helpful for my work.

Learning should not be greedy, impetuous, sharp success or quick success, and no one in sight. Keep your learning plan longer and cultivate a good learning method. C is the basis of the programming language. We suggest you start with C! Also, I heard that most of the hackers are hardcore fans of C language. At that time, I listened to this, so I learned to C! This belief makes me stick to learning, learning, and learning! I hope everyone will have a belief in programming languages!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.