Thread: How really learn c?

  1. #1
    Registered User
    Join Date
    Mar 2012

    How really learn c?

    So i have read about 2 books about c, currentlybtaking a c class but im having a bit of a learning issue

    When the class first stared it was very easy, i got everything and was able to do all book excersices with out problem, printf, scanf, ifs, for, do, all that was pretty easy. Then mid semester came in harder loops, struts, pointers, etc stared to appear and all the sudden im completelly lost

    How did you guys learn this second part of c??? Is practice practice practice the real solution?????

  2. #2
    [](){}(); manasij7479's Avatar
    Join Date
    Feb 2011
    Err.. what exactly are 'harder loops' ? Once you understand the logic behind looping, all loops are similar to make.

    Practice, practice, practice -- like a robot may not be the ideal solution..but unless you really enjoy programming, it is the only solution.
    If you do, try making a nice project just for the fun of it...and once you get to see something of your creation work, everything will start falling into place.

  3. #3
    - - - - - - - - oogabooga's Avatar
    Join Date
    Jan 2008
    I made a pact with the devil. But I suppose you could practice.

    Actually, pointers are often confusing to newbies. Learning a little assembly language and how computers actually work helps a lot.
    The cost of software maintenance increases with the square of the programmer's creativity. - Robert D. Bliss

  4. #4
    Registered User ledow's Avatar
    Join Date
    Dec 2011

    Have something to practice on (exercises get boring quickly and rarely have real-world value). Start with something simple and FIND OUT how to do it in C (best way to learn it to posit a problem, try solutions, and see what happens - best way to reinforce "what works" in your head). My usual candidate is a Yahtzee or similar dice game. Easy, simple, can use lots of loops, conditions, randomness, input, output, etc. and quite simple to understand the game itself.

    What, exactly, is hard to understand about a loop? Why not see how others are using them? Why not see what they are generally used for? Why not try to make your own version of one of those codes having seen an example?

    Expecting to read a book and then, when you get to the end, "know" anything about the subject at hand is naive. It won't happen. You'll have a temporary familiarity with the subject but you WON'T learn.

    Seriously - find yourself a simple project that you're interested in and do it and don't stop until it's done. Noughts and crosses, Yahtzee, a membership database, any of the classic simple program examples. If you truly don't pick it up, it means you aren't DOING, just reading. I can read a book on how to drive a supertanker. It doesn't mean I know how to do it. It's the same for programming, which is a PURELY intellectual exercise.

    - Compiler warnings are like "Bridge Out Ahead" warnings. DON'T just ignore them.
    - A compiler error is something SO stupid that the compiler genuinely can't carry on with its job. A compiler warning is the compiler saying "Well, that's bloody stupid but if you WANT to ignore me..." and carrying on.
    - The best debugging tool in the world is a bunch of printf()'s for everything important around the bits you think might be wrong.

  5. #5
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    segmentation fault
    Write a linked list. That will help you to understand structs and pointers.

    Linked Lists in C Tutorial -
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  6. #6
    Algorithm Dissector iMalc's Avatar
    Join Date
    Dec 2005
    New Zealand
    Being self-taught works best. Then you can think of the teacher really only being there to push you in the right direction and introduce you to new things. But if you really want to learn it then you will just make time to do so and learn everything your own way.
    My homepage
    Advice: Take only as directed - If symptoms persist, please see your debugger

    Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Do you ever try to learn too much?
    By Stonehambey in forum A Brief History of
    Replies: 11
    Last Post: 06-17-2008, 07:55 AM
  2. I need to learn more.
    By samus250 in forum C Programming
    Replies: 24
    Last Post: 03-26-2008, 04:08 AM
  3. What should i learn next?
    By Syneris in forum Windows Programming
    Replies: 3
    Last Post: 01-01-2006, 12:57 PM
  4. You have to learn C in order to learn C++
    By gandalf_bar in forum A Brief History of
    Replies: 20
    Last Post: 07-16-2004, 10:33 AM
  5. Which to Learn?
    By elaechelin in forum Windows Programming
    Replies: 2
    Last Post: 01-10-2003, 06:46 PM