If it is a beginner C language, Please read the experience of some successful people

Source: Internet
Author: User

a column from enters upgradeable
today, I am able to claim to be a mixed it person, and to make a living, in the future we can make a living, Thanks to two people: Claude Shannon and John von neumann, they have discovered all the digital information, whether it is a program, an email, a movie is encoded in a series of 1 and 0; they found out that we can use a pre-programmed program to control the machine and make it do what we expect it to do. Suggest that everyone in the heart meditation three times their names, as a token of Admiration. of course, If you bring your knowledge back to their time, there will be no Turing Award.
C language programming is our professional basic course, but the C language itself is a very powerful tool, it is so far the most widely used tools, and in the foreseeable future, it is still converted to programmers in the hearts of the Artifacts. What does this tool do? It creates a platform for communication between man and Machine.
One day, you need to complete a 100 factorial job, so you moved to an up-to-date computer, installed the latest Windows Vista operating system, and then sat in front of it, shouting "feed the computer, calculate the factorial of 100", the computer said "ok, wait a moment"; , a plate of mushroom cabbage End up! hehe, the computer is not waiter, you feed it it will not have reaction, if you really wait a moment, I am afraid you need wait one more moment! 10,000 years later, people will call you "lookout cliff".
Since the computer is not supposed to be born and can't understand us, then how can we control it? If you are deaf to me, I will tell you that you are dead at the end of the semester, oh, you are honest! How can I make it work for my computer? yes, We have a powerful tool, c language!
ok, Let's review the above scenario:
You want me to count 100 factorial, so I went to the computer room machine, wrote a program:
(take part in PPT ...)
Run the program, oh, the results come out!
Some people think that now is the era of Java and. net, who still need C and assembly? I don't know, Java and. Net is built on the software, is to monopolize the market and the establishment of the system, as if to dig a golden wall brilliant pit, please jump down, but also think of standing on the shoulders of giants, in fact became the frog in the pit bottom. To become a real programmer, and expect to become a master programmer, must start from the machine, from the CPU to the operating system, and then to the software system, the realm of the master is enlightened after the mirror lingtai, software design superb, I am the program, the program is Me.
After listening to my master of the realm, so you are very touched, said: I want to study hard, to master learning! The next day to buy a bunch of mfc, VB, Java and. Net books back, Five o'clock in the morning up endorsement! This is not possible, the right way to get started only one, to pass the road, only this method! students, starting with C language, try to learn C language!
Spectator John Doe Said: This is stupid also! I use the mouse to drag a few controls, is a XXX management system, you use the C language afraid of a year can not write it! well, I would like to admit that this is already the slave of ms, other I do not understand, MFC itself is a closed architecture, from MFC to learn, you will only form a closed thinking mode, because Ms hope that many people only learn the surface of things, not to become a master, So it strongly recommends the so-called visualization of the program development tools, There are many people are willing to go to his when, finally really lost Direction. Said he could not sit the program, he can also do, but if the program is a bit more complicated, there is a problem, where the problem is not clear, anyway is not clear!
Liang Zhao xin, daniel, He said: "i do not understand, with the mouse how to write the program?" In my company, the master of the keyboard ring, the mouse occasionally ring, the novice is the mouse ring, the keyboard occasionally ring, their salary is not a difference of so much! ”
C language is the basis of the major operating systems, Unix, Linux, windows its kernel is exclusively C language development, (some places are mixed with assembly language), you do not see the Windows API is the C language function interface? Unix/linux Most of the applications are C language development, Windows applications with pure API development is not much, mostly rely on some kind of application Framework, such as the so-called VC + +, actually refers to VC IDE + C + + language + MFC ( The focus has now shifted to atl, WTL), but the underlying software, such as Windows services, networks, drivers, or C language has been developed. Compilers for various languages, including Java Virtual machines, have been developed in C Language. A variety of embedded devices, such as mobile phones, PDAs are also developed in the C Language. C language has a long history, its content is not rectification Teacher's "Clanguage programming (second Edition) as described in the simple--that book is just an introductory book on China's National Conditions.
students always like to ask: What kind of language is good? Learning that language has a future? The question is discussed every day, never ending. In fact, I think everyone is concerned about, but that language is more "money", learning that language after graduation can easily find a high-paying job-that's what I thought. well, I tell you, if you are proficient in c, please go to huawei, don't waste your youth in a small pond!
OK, Listen to my earnest advice, you are ready to start from the C language, began to climb the peak of the programmer master, before you go, you need to prepare in the luggage?
The first to pack in the bag with you forward is the "standard format", there are many textbooks, reference books, not too much attention to the problem of the format of the program, write the program like a heap of rubbish, which also led to many people write the program has a lot of scrap code, garbage code, and those books have a very big relationship, I'm going to take all the writers and hit pp. The real business process is absolutely normative, Zhang San write the program and John Doe program format is roughly the same, the various identifiers of the naming rules, or else who can not read the program you Write. If the code written by anyone can not read, it is absolutely rubbish. If you want to turn those rubbish half a day, reluctantly to find out the gold, then this procedure is not as good as the re-written, so that the idea will be clearer. therefore, the canonical format is the basis for getting started. What does the format of this specification include? A lot of ah, to insist on to do! Long marker name, code indentation, a pair of curly braces no more than one screen, and so On.
The second one to pack is patience, so-called 工欲善其事, its prerequisite. It is impossible to succeed without a relatively dull process. It's not just that you have to be patient in your learning process, you have to be gradual, and you're talking about another important aspect: the tuning process. Debugging is the process of writing a key aspect, if someone can write a program, cow, and is daniel, not only daniel, or I rode the green cow, mortal is do not tao! Debugging is the process that every program must EXPERIENCE. Often classmates asked Me: teacher, my program is not wrong ah, are copied according to the book ah! How can you not run it? I can not see this problem! You have a problem you can find me, to find other teachers, teachers to find who ah? Lee Father? That's ridiculous! I had to sit down to debug, this to tell the truth, debugging is very boring, so there are students complaining that I operate too fast, do not understand why to do so, why should that, my temper is not very good, a irritability will curse the ground, so, This requires you to cultivate their own internal strength!
With these two on it, you can start, it is estimated that some people say, English and math do not? We all say college students, this kind of problem don't ask! You have used the morning and evening time to learn english, I do not want to go, computer professional English Super simple, Elementary level, Remember some professional vocabulary can be! About mathematics, say math good, Write program is good is no scientific basis! I have a classmate, Mathematics hui 100 points, write program is Hello World degree, but people now is a doctor of mathematics! Shame on you! As the university students, and is our professional college students, has been fully equipped to write the process required mathematical literacy! So That's not what we're worried about, ready? Go!
What do you learn from the first trick? Hit the dog stick method! Hehe
There was a great man who said: "repeating authority is the only way to mature", This is standing on the shoulders of giants, the first to learn the martial arts are all kinds of routines, such as evil sword, and then to digest, open the sect genre; we learn to write programs like this, This is a shortcut to help you go farther to the Shortcut.
read, Watch the book! Written in the book, is written by the predecessors decades of experience, read 10 books, It is equivalent to learn from the predecessors decades of skill, then your internal strength will quickly rise 1. : books, of course, should be optimistic about books, only good books are rich in Nutrition.to do a book broken million, programming like GodBoring reading is very depressed, it is easy to become a fossil! Now a lot of books are using the source code to explain the problem, the source is like an animation, like a slide, the book of the moves one by one to you to See. It can be said that the Master's experience is mostly derived from the code, and finally all into the source to show in front of everyone, the book on the program one of the input (with the keyboard, with your finger) to the computer, compile and Run. Their own manual input this step can not be omitted, and now a lot of books have matching source code, Many students or adults learn to play smart, directly copy the source of the past compile and run, hoho, this is no effect.
naturally, I let you enter the program is not let you practice blind, you enter the process can be good or bad, if you find yourself entered a lot of duplicate code, then at least the structure of the program is bad, poor change, change then pass, you want to improve it ah, this is not very good?
of course, The program loses much, blind playing skill also on a step, the keyboard knocks fast, salary also follow up up! ^_^
however, the keyboard to knock fast does not mean that your program is written well, otherwise the school as long as each student send a blind contact software, four years after graduation, all are the program master!
okay, you lost a program into the computer, exercise the hands of the muscle, also run out of the results, happy body and mind, this satisfied? That is far away from the master, to become a master, you have to exercise your brain muscles! Pick up your pen, pick up your paper, with your brain, this is known as the World's most sophisticated machine to run your input program, record the values of different running time variables, record the running branch of the program, and finally found that the program was you dissected to the paper, I believe also dissected into your heart! This is the core of the shortcut, it is important to remember that the input program is not to say that the correct operation is done, to read the code, using pen and paper as an auxiliary tool, make notes, This is the repetition of authority, of course, if you are a genius, then please plug your ears, you are not within our scope of discussion!
Why is this step important?
When we first started to learn, is there a feeling that if you write a program, where do you start? Front? Behind? Above? Below? In order to solve this problem, how should my program write? scratching, very annoying ah, and then simply go to bed, do not write, you see, This behavior is to hit pp!
Practice Martial arts, always first repeat Master's action, to have their own movements, so also let us re-repeat other people write the program began, and then write their own program!
Following this approach, you follow the organization on the road to rome!
next, you have to go, how do you get to rome? Apply the program design method you have learned to the program you wrote!
One day, you see a problem here, you have the idea, how to do? Go on the machine, and fight the keyboard! stop, stop! pause, before the machine, do not forget your pen and paper, bravely put your ideas written down, if not written out, do not go to the computer room wasted father and mother's hard-earned money!
of course, you can not write ah, write out of what is not to write it?practice is the only standard to test truth! Use your brain to run one side ah, not called "human program unity"? , That's it! Learn martial arts must learn the peerless martial arts! Although known as the most sophisticated, practical effects, the human brain is still no computer accuracy, if your brain can be so carelessly run out, then ok, with the standard format and patience, go on the machine!
naturally, we say all the while facing the character interface TC is somewhat depressed, everyone is accustomed to windows, Microsoft's customer transformed design Center is not blown out! How nice and colorful windows Are. When you cultivate to my level, I have to listen to the Beijing opera to write the program, of course, with Windows under the integrated development Environment. But for everyone, not now, windows is very dangerous, the programmer still go back to tc!
TC has at least one advantage, you can exercise our habit of using a combination of keys, we can exercise our habit of using keyboard programming, recall What we just said the beam said "how to program with the mouse?" "some students have to ask questions, I was born in the 80 's or even 90, you also let me face so boring input and output interface?" I have a generation gap with you! I look forward to a richer and more appealing way of interacting.
oh, this question is very good, C language also has graphics ah, fully can meet everyone's psychology of entertaining! Let's look at this program, very simple, is on the screen to talk a period of sine wave!
(see ppt ...)
Is the effect of the operation very good? When you learn the data structure, tree, figure ah, You can output ah, a lot of places you can do better!

well, here, We basically solved some of the methodological things in learning C programming, about the specific learning process, if you want me here to tell you how to learn pointers? How do functions learn? I will not talk more than the content of the teacher, or open a topic called "how to learn pointers", of course, if you would like to discuss with me the nature of pointers and advanced applications, after class, after class ah!
now, Let's talk about one last question! Our professional ratio of girls to other engineering majors or higher, do not know why often to the following statements: 1, I am a girl, I am not suitable for writing programs ah; 2, my personality is more outgoing, not suitable to sit down quiet writing procedures!
Outgoing personality is not suitable for writing programs? You look at me, think I'm an introvert? Programmers are also very much in need of divergent outward-looking thinking, old, the richest man on earth, who says he is more willing to recruit programmers than to learn physics, because the mind of a physical person can be from a great (cosmic) to a very small (atom). all, say the extrovert is not suitable for writing programs is Lazy excuse, is to cover up his unspeakable purpose of the interface! Beat pp!
Why is it not appropriate for a girl to write a program? I know a reason, bad for the skin! If you look at my face, I know it! besides, is there any other reason? British scientists have long proved that the distinction between men and women is not exactly what people think, many women are more than men! Think of the former matriarchal society, now the Huian woman!
I've seen the development of a public company. two all women! , from software engineers to hardware engineers to department managers are women, performance is not lost in other research and development department, this company in hunan, not my nonsense!
students, ask everyone a question, "21st century what is the most expensive?" ", good, is a talent, so, I can responsibly tell you," do not learn C language, The teacher is very angry, "the teacher is very angry, the consequences how ah? is very serious!
That's all, Thank you!
Learning C is not a overnight thing, but it does not take 10 years to be Proficient. How to learn and Master C language at the minimum cost is the topic of this Article. Note that even the "minimum cost" is by no means a shortcut, but rather the shortest time to get the most harvest,It also means that you need to go through the hard process.

Read a good book if you want to read it, or you might as well not read it.

The first question that all beginners face is: How to choose a Textbook. A good beginning is half the success, choosing a good textbook is a key factor in doing more with Less. unfortunately, schools usually help you to designate a very poor C language textbook, and fortunately, you can choose Again.
   the famous professor rectification out a copy of theClanguage programming, which is said to have a circulation of more than -million, as far as I know, many schools will recommend this book asClanguage textbooks. Although my name (Tan Haoyu) is only one word from the professor, I am very determined to black his book. The book is not for computer majors, but for other majors who need to test for a computer Grade. The main disadvantage of this book Is: The example program is very unprofessional, can not teach you the design should grasp the way of thinking, the program style is not good, it will let you develop the habit of writing code, too many mistakes, have been pointed out the book hundreds of errors, there are no lack of key conceptual Errors. well, This book I do not want to say too much, is interested in you can Baidu a bit:)

Kernighan and Ritchie's "the C programming Language" (chinese TranslationtheC(programming Language)classic, but the old version of a lot of content is outdated, and now the standard C language is far from,we must look at the latest version,Otherwise it's better not to Look. In addition, even the most classic of the most authoritative books, there is no way to do everything, so handy a copytheCLanguage Reference Manual "is very necessary. The C Language Reference manual is "c Reference Manual", is a detailed description of the C language standard, including the vast majority of C standard library function details, is considered to be the best standard C language Reference. incidentally, the latest C programming language was revised in accordance with the C89 standard, while the C Language Reference manual describes the C99 standard, which may be somewhat out of the way, and is recommended to be studied in accordance with C99 STANDARDS. There's a Copy.theCand Pointers ",Writing is also quite good, English name is "pointers on C", especially emphasize the importance of pointers, is a characteristic of this book it. But this book is not very suitable for beginners, if you have learned C language, there are some C language foundation but not very solid, then you can try this Book. I believe that as long as you understand the pointer, C language is no longer mysterious.

If you have eaten a C language textbook and want to go further, There are two books you must see. first,theC Traps and pitfalls"(C Trap and defect), a very thin booklet with very, very interesting content. Note that this book was written more than 20 years ago and that many of the c-language flaws mentioned have been improved, but it is not a bad thing to be able to understand some history. Then you can challenge "Expert C programming" (chinese TranslationtheCExpert Programming "),The book, as its name, is difficult, and once you have read it carefully and thoroughly understood it, you can confidently write "mastering c" on your Resume.
Remember a principle, do not read the book you do not understand at present, it is a waste of life. If you do not understand, then you must be missing some essential basic knowledge. At this point, you have to carefully analyze what you need to add, and then go to the bookstore to find the books that tell the Content. The basic knowledge after the completion of the back to learn, will be the real multiplier.

second, Unix/linux or windows, This is a big problem

Different programming environments can create different thinking Programmers. Most programmers in Windows rely on an integrated development environment, such as visual Studio, and UNIX programmers love makefile and Consoles. obviously, The integrated development environment is easier to get started with, learning C on windows, just a few basic visutal C + + toolbar buttons will start to write hello, world!, and under unix, you need some basic knowledge of console Operations. Some people may think that the UNIX environment is more concise, but the power of habit is very big, everyone is very familiar with the basic operation of windows, and in order to learn C language to install a UNIX system, it seems a little Cost-effective.
For a novice who knows only the basics of windows and doesn't know anything about dos, it's important to do something interesting and meaningful as soon as Possible. Writing a small program in C is far more interesting than learning ls, cat and so on, and we have to focus on the C language itself, we have to temporarily ignore some things, such as the process of compiling links, makefile, and so On.

So I suggest beginners should take visualc++ 6.0 (not visualc++. NET) or Dev C + + as the primary learning environment, and never dwell too much on the Ide's skills, because you will have to turn to the UNIX environment in the Future. Visual C + + 6.0 is easy to use and debugging is straightforward, but its default Compiler's support for the C standard is not good, and Dev C + + uses the GCC compiler to support C99 STANDARDS. By the way, many University C language courses are still using the Turbo C 2.0 as an experimental environment, which is quite undesirable, the reason is that TC 2.0 has little support for the C standard, the second is the TC 2.0 compiled program is 16-bit, This will cause great distress to understand the 32-bit program in the future (of course, using something like DJGPP can make TC 2.0 compile 32-bit programs, but that's too complicated).

When you finish learning a c-language textbook, you must move on to the UNIX platform to continue learning, and almost all of the advanced c-language tutorials are based on UNIX platforms (such as "c expert programming"). The process of change is painful, you need to face a variety of complex commands, completely different from the Windows platform thinking, but this pain is worthwhile. UNIX and C are symbiotic, Unix thinking and habits more in line with the C language of thinking and Habits. Under unix, you can find countless excellent source code for you to read, you can easily see a library function of the online manual, you can see the best code style (speaking of code style, I will write a detailed article).

It boils down to a phrase: beginner c, the recommended Windows system and integrated development environment, and when you're ready to go to the "master" direction, turn to UNIX platforms First.

three, Everything is ready, you are the East wind
The book has been selected, the environment is configured to complete, so-called ready, only owe your own efforts. Please start from the preface of the book, carefully read the materials at hand, many people read like directly from the first chapter to see, this is the wrong way. The preface is the Author's General introduction to the whole book, and the author will generally tell you what foundation you need to be able to read the book smoothly, which can help you test whether your basic knowledge is already available. After reading the preface, but also to browse the table of contents, to understand the overall structure of the book, by the way to arrange a study Plan.

Learn C language, must pay attention to every detail, the Book's example code must be personally knocked over, compile and execute output is consistent with the book said to be an example of learning, if not consistent, you need to carefully find the Reason. Out of some examples of books, and you want to "create" some examples, such as learning operator precedence, You can write several identical expressions, in different locations with parentheses to see what different behavior, such as *p++ and (*p) + +, such as a = b = = c, (a = B) = = c and a = (b = = C) and so On. The examples of the books that you copied and the examples after the transformation, as well as examples of your own "creations", should be carefully categorized and kept in a short note in the source code to illustrate the intent of this Example.

After the example is the problem, I suggest that the beginner to all the exercises are done independently, and then against the code of the answer, to see their own code is insufficient, and then try to modify their own code. Many people do not pay attention to the exercise, this is a great mistake, because the author usually in the exercise to explain some important truth, rather than simply test the previous Knowledge.

Maybe you think it's too slow to Learn. Learn to be careful not to go back, and so you learn to find yourself in front of not clear, that is really worth the candle. Generally speaking, the whole book read, you should complete thousands of lines or even tens of thousands of lines of code, whether it is copied from the book, or their own whim to write on, are continuing to learn a wealth of Future. Take my own example and readtheWindowsCore Programming "(i only read 3/4 of the content), in addition to the code on the transcription, but also wrote a lot of examples, a total of 5574 lines (with the use of Unix WC tool statistics), after a few days, I have not forgotten the Windows system programming, but just a few minutes to turn over the previous code to see, will be re-aware of the chest The so-called good memory is inferior to bad writing, this is the Truth.

Read carefully, carefully copy the source code, The independent completion of the exercise and further experiments, and finally all the code left behind, become their own experience and wealth, absolute hard, but also absolute multiplier. Of course, This approach is only suitable for learning skills that need to be proficient, and if you are not learning c, you will need to specifically analyze the Situation.

In the end, there is a very, very important point not to mention the code style, which must be forced to imitate the best code style from the very beginning. Because the code style too important content too much, I will use a special article to discuss in detail, please pay attention tothe Programmer's Roadabout the style of Code.
The topic is about C language, in fact, I want to talk about the program how to learn, or a little sentiment, here, I just want to cite the example of several people around, to talk about the understanding of program learning

The first person to talk about me, I am interested in the program, is heard that the program can play games, at that time is in the first day, but borrowed a g-basic concise textbook, I then silly eyes.

Strange words, Strange logic, are some of the Chinese translation of astronomy, headache for a good while.

however, there was no other deliberate come to see, I was holding the book all day, what methods have tried, and even looked backwards, did not see what the plan, and no computer, can only keep on daring to imagine, and then full of doubts ...

Stop here, above said is My learning style: always have to go through some twists and turns, blind toss a few, and then there will be accidental awareness-enlightened! I have not even seen a few people have me so stupid, now understand, I always start to think about things too complex, causing the dog bite the Hedgehog embarrassing situation, however unexpectedly has the unexpected harvest! But do not recommend that you imitate this style, at least when chasing a girlfriend can not be so, life is a lot of opportunities to take over the moment, lost will never find Back.

Now come back, then by chance, I understand a line of code, is the print statement, at that time the excitement is deadly, and carefully looked at this to see that, suddenly see a lot of things, like in the grabbing between what to hit, immediately between clairvoyant ....
Third day in school learned foxbase, basically self-taught, I found a strange thing, I this person is out of the name of the memory is not good, but then the command in the back of the program is a photographic, to now still remember a lot, perhaps is interested in it, but also thanks to my computer teacher to provide me with the opportunity to free on the machine! Later I self-taught qbasic, four summer and learned a little c, then learn C encountered a lot of difficulties, at that time we school room even C language, I had to stuffy at home, a two Class C textbook, a matching exercise, all day a daze to think, put their brains when the computer cpu, sometimes into the dead loop, And sometimes it crashes completely. I spent more than 10 days reading a book, finished a subject, but the mind is full of doubts, because there is no chance of machine practice, I rely on their own speculation and reasoning has slowly established a lot of theory, very proud and self-confidence, but later proved that most are wrong, I spent a long time to correct, this is Something. however, still that sentence destroy nothing, do not hinder. Like I now have a computer, all day in the Internet to soak in the sea, feel the fast food culture, a long time has not been quiet to think about something good.

High school also had a few computer classes, but busy coping with the college entrance examination, I will learn the program's intention to give up, to here I should say a Person.
High school sat next to me a girl, her text in the star has basic, I occasionally brought up a few small program to play, she saw very interested, it is surprising that she only looked at 35 programs, listen to me to tell a few commands of the function, can according to their own imagination made small animation, she had never learned the program! I once doubted her iq, but her program was so fast that it made my eyes stare a couple of times higher than I was when I was a few years old! I often think, is not the way I was wrong, the program should be how to learn ...
Flash to the university, I met another let me admire the person, as I am learning computer, He is occasionally see me in the animation, and then very interested, then began to Self-study. He is amazing, pointers, structures, bit operations and so on, do not understand (not to mention algorithms and data structures), only learned the three program structure, now only learn C six months, they can make up the snake, tetris, minesweeper, and a lot of the little name of the small game, and now in writing othello, I know that I did go a lot of detours.
How the program should be learned,theCspeaking, I think we should learn from Drawing.
There are two Reasons.
first, The drawing program is very exciting, it can bring you a strong interest, this is the key to learning Procedures.
two, Drawing program easy to get started, very simple truth, you can make very beautiful things. There are a lot of things you can do without even reading a textbook (i think the method of reasoning is important, it is a necessary condition for self-study).
For example, draw a circle, from the mathematical point of view, to determine a circle, just know its center (x, y) and Radius r, then a circle is drawn out, Circle (x,y,r);
Other analogy, and then draw a three-dimensional, Select the cube, and then analysis, as long as the two diagonal coordinates on the line, turn over the textbook, not so, why? You may think that the computer screen is a plane, the theory of three-dimensional coordinates here, I am afraid it is not the simplest way. So it's supposed to be two planar graphics panning. Here is the question, how is the stereoscopic figure represented in the plane coordinates? self-study slowly, very shallow things.
Want to make animation, imagine the principle of animation is just from one graphic to another, different changes appear animation effect, then you can draw a, wipe, and then draw a new, and then change ...
Good math skills, from two to three-dimensional, from static to dynamic I think the transition is very fast.
Specifically how to learn, you can find a few examples of drawing, knocking on the computer, more than a few, slowly you will know what things are doing, and slowly will make their own things.
But don't dwell too long here, learning to draw is just to help you get started easily (a lot of people are not getting started with C learning).
Come out of the drawing temporarily, you should lay the groundwork, here no longer repeat. Can learn while practicing, physics, Mathematics textbook Many problems can be demonstrated by the program, to solve, try to do something more, this is more than you learn textbooks in the model is much stronger, only you have to experience to KNOW.
Speaking of c, I think that any friend who has learned it has the feeling that "let me rejoice and let me worry." "the Joy is that C language features are very powerful, widely used, once mastered, you can confidently say to others," I am a computer master! , and it's easy to learn other languages Later. The worry is that C language is like "shaolin martial arts" generally profound, too difficult to Learn. In fact, I think that C language is not "difficult (difficult)", as long as you can clear the idea, master its essence, then self-study C language is a very easy and fun thing. Today I will talk with you about how to learn C language or to learn C language from which aspects to Start.
Learn some basic knowledge

A Background of C language

personally, no matter what language you learn, you should first understand the background of the language you are learning, or the history of it.

C language belongs to a kind of high-level programming language, its predecessor is "ALGOL". Its founder is Brown · W. and Dennis · M. Leach. The C language comes with a lot of limitations because it can only be used on Unix systems. however, with the progress of science and technology, the development of computer industry, C language gradually divorced from unix. In 1987, the American Standardization Association developed the C Language International standard, referred to as "ANSI c", since then it became a widely used programming language. C language has many advantages, the main is the following four points:

1. Both high-level language and low-level language advantages, belong to an intermediate language.

2. It is a structured programming language that is well suited for structured programming.

3. There are a wealth of data types, operators, and functions to choose FROM.

4. Working directly with memory makes it easy and easy to modify and edit other programs and Documents.

Two Two different learning methods for two major languages

I have learned a lot of programming languages, such as: c,c++ (extension of C language), qbasic,vb (basic visualization), javascript,jscript, Vbscript,java,asp,foxpro,perl and so on, I practice the income, In fact, high-level programming language is divided into two major families. All the way is a c-based programming language, such as: javascript,java, and so on, such language in the function of the call, the writing of the program statement, the control of the loop is very similar. The other way is in BASIC programming language, such as: foxpro,vbscript, such as the same language has similar function calls, program statement writing and Loop control, but is different from the C Language. So if you have started from qbasic, then it is best to wash your brain before you learn c, and never use your basic methods and ideas in C.

In this case, I think we must have a perceptual knowledge of C language! Let's take a closer look at it and get a full touch of it. C language Learning must start from the following four points, that is, as long as you can master the four points of content, then basically DONE.
    How to learnClanguage
I was asked if C language is not difficult to learn, I said no, later asked a lot of people, I started to write an article about how to get started in C language Ideas.
In fact, c is very simple, it is just a communication rules, a tool of expression, a container of carrying ideas, it is difficult to feel, I think is not accustomed to the use of computer features to consider the Problem. This is like the Chinese from the United Kingdom to settle in, although you learned english, but that is the imagination of the United kingdom, and the reality of the United Kingdom is far from the situation, so there should be a process of adaptation, that is, often said transition or running-in period.
To get started as soon as possible to master the characteristics of the computer, the characteristics of the computer include:
1,the way the computer handles the problem requires a full, and will all probably have to tell it. People can ignore things according to their habits, but computers do Not. For example, to solve a two-time equation, we consider the problem is already default to a is not equal to 0, and even the b-square minus 4AC is also the default greater than or equal to Zero. This is our habit, since there is a solution, we generally used to make it a real solution, so you do the procedure is generally not to consider these two conditions, but the computer does not, the computer is a well-known mental retardation. The computer has no human-like intelligent processing power, It is a faithful believer, regardless of what you think, it will carry out your command. Because of your habits, some people who have ulterior motives or who have no intention of making mistakes, cause the computer to be confused Sometimes. Very tired, even crash, error, cause your program is not successful, so you feel very difficult.
2,the computer requires a precise description of the program, no Ambiguity. People's Language has a very strong randomness and two semantic nature. We usually talk, sometimes is some greeting, sometimes the logic of the speech can not be very clear, words can not only express the meaning, can also express that meaning, people can according to the environment and the other side want to express the meaning of analysis, and finally get the correct results, but the computer is very retarded, although it is very obedient, But he can not understand the ideas you express, only according to the instructions you gave to execute, which led to the execution of the alarm and Error.
3, computer programming is required to have a strong overall and logical, there is no problem of ups and Downs. People's Thinking has a strong active and dormant period, the computer will not, it is always on standby. When people think about problems, there are a lot of things to enjoy, but this is not the whole problem, but part of it, so there is a piece of code to finish, it is not willing to write again, or feel very hard, so it feels difficult.
The computer requires its owner, consider the problem to be comprehensive, all possible situations and processing to tell it, the need to learn calm, the mentality of stability, the need to communicate the statement must understand the meaning of a single.
How to quickly learn C language, faster to spend the running-in period? C language of the grammatical rules of the memory understanding of course is indispensable, in addition to pay attention to the following aspects:
1, a good understanding of the concept of variables and functions, at least to look back at the elementary Mathematics. This is the foundation, otherwise it will be congenital, you learn better, also can not become a Climate.
2, balance mentality, Although can not do "not with the things happy, not with their own sorrow" level, but at least not impetuous, do not rush to haste, Waste.
3, the cultivation of their own global consciousness, can not only small, but also large without outside, just do.
4, in strict accordance with the procedure design process design procedures, do not jump off, unrestrained, no rules are inadequate surrounding AREA.
5, strive to improve their comprehensive Quality. Procedure is the expression form of human thought, and it is the combination of People's thinking and language of dealing with Problems. You are in direct proportion to the degree to which you know the Objective. If you do not understand the problem of processing, will not deal with, you can not write the Program.
6, Learn to communicate, more exchanges, mutual complementarity, and teamwork is also very important.
In short, the practice of genuine knowledge, more learning, more practice, more thinking, more exchanges, studious to Learn.
What is not suitable for the place also please advise!

If it is a beginner C language, Please read the experience of some successful people

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.