My way of learning C 2002.10.22 Author: Andy GPA Studio Http://ChinaGPA.com Why learn C language speaking really felt a little ashamed, I recall a year ago because the test medium-range away learning C language. Xiao A is because of this, I have already contacted the C language. I often heard some bad rumors for preparing to learn. I don't know if it is rumor. Anyway, they say "I have been learning C language", I am Say "C language is too difficult to learn", etc. I have several students who have learned VB or VFP at that time (learning VFP is actually because we came from FB), so I really had a little shake, but my goal is still not It will change: admitted to programmers.
I am going to study the mid-term, I will study this in the high school, just studying this matter while rising to the high school new semester. First of all, I must have a book in hand, but as for buying books I have to think about it (a good entry can bring the interest of beginners). Just this year, the new year is also learning C language, I think the teacher's choice should not be wrong! Finally, we have our first C language book "C-program design second edition", the author is now called "old pool", and his people are famous.
The beginner C language is read by me. Every time I look at a new book, and I still try to come up with probably content (this is totally small A "Tianma Down" imagination). For the experience of my book, no matter what book, I can't imagine it, I can do it completely, so I usually start reading a few times, I can understand it in the place, I don't understand it. Often it will be "originally" after reading it several times, so my suggestion is to start reading if it is difficult to meet what is difficult, and you can skip this part directly. Explain, the above is my new understanding of learning. I used to be a steward step by step, so the content of the following will be "avoided". "
Talk about the "C Programming" C language Overview: Usually the tutorial of the language will explain the history of its language, "C program design" is not left.
Program soul - Algorithm: Wow! How can this chapter make me feel like I do? What is the program? A classic equation is also put, the data structure algorithm = program, is right, the algorithm is important. The representation of the algorithm can be a natural language, a flow chart, an N-S flowchart, and other tools such as pseudo code. The above is always impressive in my mind, but I can't think of it, but in further study, I finally discovered his secret. I originally had another old man's book "QBasic language tutorial", this book I don't want to open the old books, I almost give some forgotten it (Ha, Xiao A almost forgot to have learned QB language, blame small A. The interest is on FoxBase). The first chapter of the "QBasic language course" and "C program design" are not much too much, I think it is full of moving! Another point is that even the practice questions are basically the same (it is no wonder the old pool, because his computer teaching book is too much, if each is different style, then I think he has already been full of white flowers, So stealing lazy is also what, haha ~ `)
Data types, operators and expressions: Data types must be there, but the data type species of C language is more special relative to other languages. I used to learn FoxBase just touched the word. , Numerical, logical type these three. So I understand the data type of C language has also become one of the problems of beginners. I will mention a suggestion to everyone here. The data type of learning C language should not think about it, and there is no possibility of remembering them. Because for all types of data to be assigned, such as a character type assignment to an integer type, they are not wrong, the compilation system automatically converts the character to the corresponding ASCII code to operate, more other more I don't have to tell here, because there is an old manhorse. Small A is again inserted, it is nothing more than the three knowledge of the original code, complement, and counter code. If you understand this, I think everything is going. The data and operators form an expression. For expressions, this concept is actually realistic when Little A is also learning C language. At that time, I didn't learn QB, and foxbase, I don't seem to have heard this concept. (This is a small A, haha) Talking about the expression there is a suggestion to beginners, the types of operations between various types must be the same as that of the occupied memory bytes, such as INT and DOUBLE The INT type variable is to be converted to Double. Float and char are special, they all become Double and Int to participate in the operation. The priority of the operator is in a particularly important location, many programs often exist in such errors, and the debugging seems to be normal, but the result is often different. A place where you are not very eye-catching is strange. How do you master it? I don't want to take it at the beginning, I will slowly take them in the hands in the future, you don't tell me, you have finished the table, I haven't passed the table, I think you haven't been there. I have forgotten everything, so I emphasize them to master them. C language input Output Our Learning programming is because it likes it to show something on the computer screen, and this thing is completely controlled by you. Whenever it is dealing with a computer, there will be great satisfaction. The input and output can be said to be a large seat (no input and output is meaningful?) I heard the standard C actually no input output statement, it is to complete the input and output function library. STDIO.H This header file is yes, yeah! Strange, how do I just start using C to program the program? Small A, actually not, but because stdio.h's header file contains some of the most basic most common functions (input and output is focus), the compiler will give a link.
Do you just do some data type tests? Ok! It is the opportunity to move your hand, say that the initial hand is trying the program, I have to say a problem with the TC (compiler), is the problem of path design, please see http://www.chinagpa. COM / BBS / ShowTopic.asp? Topic_ID = 180 & forum_id = 33 This post has a picture to teach you how to set it. I was really hard enough, I tried a lot of output formats and expression operations, as follows: int A, float b; Printf ("% D", A b); because B is Float, so Automatic transfer to the Double type, A, A is here, which is also the corresponding Double type, and then the output result is, the result is the output of the INT type, thereby force to convert the number after INT cut the decimal point. . I think everyone will not be lazy, because the little A is already a very lazy person, but the little A is still serious. Everyone is trying to, we can't do it in a white fee. Now I think the data type and expression have a big leap. The program control structure believes that everyone is very familiar with this (someone who has learned programming or although he didn't learn, but the people who have seen it), so there is nothing to say, pay attention to the grammar. At that time, I was deceived for a place, but it was not a deception, but a little A himself was unattractive. Do ... while (); this seems to be the same as QB, but it is not the same as you think, this is until QB, this is until the cycle, that is, when the condition is true, it is true to exit the cycle. , While C, it exits when the conditions are fake, that is, it will continue to perform a cycle. (Everyone should now know how stupid it is Xiaomi! It is nothing to read, and Xiao A self-righteousness is to move QB to C) here, it is that a variety of languages have their own Features, don't think it looks like it is, if you live, you will give you a "unexpected".
The function function is in the C language that is a big feature because the composition C program is completed by the function. Advocating modularization is an important factor for process programming. Really, I especially like the function definition in the C language, because I think it is very beautiful. You see how the two {} symbols are a wired strip, it is really beautiful. Function ... End function is going to go! Hahaha.
Array, pointer, structure I like C flexible, but it also makes me more. Saying that C is flexible, you should know that it is a needle, especially the relationship between arrays and pointers. The structure of the structure is more inseparable from the pointer, at least I think so. I wrote here, I didn't want to go back, because I have said that I have written on the "Programmer Test Replenishment Notes", and it is a new view (Xiao A feels that there is different books. " , Haha ~) Of course, this thinking pointer is from my teacher. Everyone takes it down from my home, the address is http://www.chinagpa.com/ebook/list.asp?id=31, everyone has any new insights or suggestions welcome to ChinaPa.com (GPA House) published. Is this "My C Learning Road"? No, Xiao A wants to continue to apply (graffiti)! Well, in fact, there are still something worth mentioning, I want to recommend one or two good books to everyone. I bought a few related books in my study C. A "C programming tutorial" published by the machinery industry, this book is recommended to friends who like to challenge, because the exercises inside, not, should not be called The exercise, called it. It is more interesting to have a lot of mathematics's exercises than the old man. It is quite about writing a small game or more challenging to write a compiler with C. Another is that I haven't seen it yet, but the content in the book is really good, memory storage (small A did not know what to have a point near pointer, far pointer), interrupt writing and resident memory programs, actually I have thought of learning them, but because of the cause of the mid-range exam, I finally gave up, but I would still attack them. Learning is inseparable from practice, and it will naturally learn knowledge in practice. When I just learned C language, I had ADSL on my family. There were not many resources on the Internet, and they lived in my hard drive. In addition, I really appreciate the network. Today, this article can be completely affected by the network. Hou Jie, this name, I think you have heard of it, come from me after I got his website, I have changed my article, and every article encouraged me, burning my heart "fire", let I feel that learning is full of fun. The article I have written is not a shocking, but I am absolutely sincerely want to help every student. I also come over, feel the bitter of loneliness. So I really like to meet the written written on the Internet. I would like to learn from them, I have also been moved by their articles, but also more affected by their technical articles. I need to thank a person here, in just a few weeks, let me finish understanding the C language is my teacher Lin Hao Guo, I hope he will not mind putting his name in this bad. On the article, his selfless spirit made me deeply moved. For the end of the above, I am not enough, but at least give me the feeling that I think the C language is not a poor point. Xiao A is finally finished, thank you for your support for the GPA home, and the little A actually wants to let more people let more people get up on your hand, help more people. Because even the small A language can be said very bad, and the technique is not very high, at least it is possible to say that he thinks is an experience, so that more people benefit. Xiao A receives everyone here, if you are a heart, I hope you can join the GPA home, the technology is secondary, or the main people you have help. There is another thing to explain here. Many people ask me what GPA means. In fact, I also feel selfish.