interesting examples to learn C.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mike

    interesting examples to learn C.

    Hi

    I am wonderinf if there are interesting examples to learn C.
    Or any good idea?

    Mike
  • Richard Heathfield

    #2
    Re: interesting examples to learn C.

    Mike said:
    Hi
    >
    I am wonderinf if there are interesting examples to learn C.
    I suggest that you start off with a good tutorial book, such as:

    C Programming: A Modern Approach, K.N.King, W.W.Norton & Company, 1996.
    ISBN 0-393-96945-2

    or

    C: How to Program, 5th Ed. Deitel, H.M. & Deitel, P.J. Prentice Hall, 2007.
    ISBN: 0-13-240416-8

    --
    Richard Heathfield <http://www.cpax.org.uk >
    Email: -http://www. +rjh@
    Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
    "Usenet is a strange place" - dmr 29 July 1999

    Comment

    • Chris McDonald

      #3
      Re: interesting examples to learn C.

      Richard Heathfield <rjh@see.sig.in validwrites:
      >Chris McDonald said:
      >Have you read it?
      Moderate skimming.
      >Yes, that's a shame, isn't it? Nevertheless, this is easily remedied, by
      >taking a sharp blade and removing pages 666+ from the book. What remains
      >is still a pretty good book on C.
      But I can't, in good conscience, recommend that my students pay for
      50% of a book that we explicitly won't cover
      (... and the 60 pages of Chpt 15 on the Allegro Game Programming Library)

      --
      Chris.

      Comment

      • broli

        #4
        Re: interesting examples to learn C.

        K & R II also has plenty of good examples.


        Comment

        • Richard Heathfield

          #5
          Re: interesting examples to learn C.

          Chris McDonald said:
          Richard Heathfield <rjh@see.sig.in validwrites:
          >
          >>Chris McDonald said:
          >
          >>Have you read it?
          >
          Moderate skimming.
          >
          >>Yes, that's a shame, isn't it? Nevertheless, this is easily remedied, by
          >>taking a sharp blade and removing pages 666+ from the book. What remains
          >>is still a pretty good book on C.
          >
          But I can't, in good conscience, recommend that my students pay for
          50% of a book that we explicitly won't cover
          I can understand that. Note, however, that my reply was to the OP, who
          asked: "I am wonderinf if there are interesting examples to learn C." And
          D&D certainly has some interesting examples...
          (... and the 60 pages of Chpt 15 on the Allegro Game Programming Library)
          ....of which that is one. It may not be the right answer for your students,
          but that needn't stop it being a possibility for the OP to explore.

          Oh, it just occurred to me - is the OP one of your students? (That would
          certainly explain your reply.)

          --
          Richard Heathfield <http://www.cpax.org.uk >
          Email: -http://www. +rjh@
          Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
          "Usenet is a strange place" - dmr 29 July 1999

          Comment

          • Chris McDonald

            #6
            Re: interesting examples to learn C.

            Richard Heathfield <rjh@see.sig.in validwrites:
            >Oh, it just occurred to me - is the OP one of your students? (That would
            >certainly explain your reply.)
            I doubt it; my course starts in July.

            --
            Chris.

            Comment

            • Jack.Thomson.v3@gmail.com

              #7
              Re: interesting examples to learn C.

              On Mar 27, 11:00 am, Mike <Sulfate...@gma il.comwrote:
              Hi
              >
                  I am wonderinf if there are interesting examples to learn C.
              Or any good idea?
              >
              Mike
              There are lot of resources on web, you can google it or you can find
              some interesting set of C programming puzzles at http://programmingsite.googlepages.com


              ~Jack

              Comment

              • Flash Gordon

                #8
                Re: interesting examples to learn C.

                Jack.Thomson.v3 @gmail.com wrote, On 27/03/08 10:36:
                On Mar 27, 11:00 am, Mike <Sulfate...@gma il.comwrote:
                >Hi
                >>
                > I am wonderinf if there are interesting examples to learn C.
                >Or any good idea?
                >>
                >Mike
                >
                There are lot of resources on web, you can google it or you can find
                some interesting set of C programming puzzles at http://programmingsite.googlepages.com
                That is not a very good site. Because it has not been done very well the
                #includes are missing the file names, it uses void main(), asks what the
                output of programs that invoke undefined behaviour is and in the answer
                does not make it clear the behaviour is undefined but instead states you
                *will* get one of two specific results. A quick scan suggests other
                problems as well.
                --
                Flash Gordon

                Comment

                • Richard Heathfield

                  #9
                  Re: interesting examples to learn C.

                  Mike said:

                  <snip>
                  I'd like to ask you think of somebody who never learns well on math
                  and doesn't have good logic in his mind. They usually like to surf
                  the web, play on-line game, listen mp3 and watch videos. How to teach
                  these students in a very interesting way?


                  --
                  Richard Heathfield <http://www.cpax.org.uk >
                  Email: -http://www. +rjh@
                  Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
                  "Usenet is a strange place" - dmr 29 July 1999

                  Comment

                  • CBFalconer

                    #10
                    Re: interesting examples to learn C.

                    Mike wrote:
                    >
                    .... snip ...
                    >
                    I'd like to ask you think of somebody who never learns well on
                    math and doesn't have good logic in his mind. They usually like
                    to surf the web, play on-line game, listen mp3 and watch videos.
                    How to teach these students in a very interesting way?
                    Why? Do you want these nerds fooling with real software?

                    --
                    [mail]: Chuck F (cbfalconer at maineline dot net)
                    [page]: <http://cbfalconer.home .att.net>
                    Try the download section.



                    --
                    Posted via a free Usenet account from http://www.teranews.com

                    Comment

                    • Mike

                      #11
                      Re: interesting examples to learn C.

                      On Mar 31, 10:01 am, CBFalconer <cbfalco...@yah oo.comwrote:
                      Mike wrote:
                      >
                      ... snip ...
                      >
                      I'd like to ask you think of somebody who never learns well on
                      math and doesn't have good logic in his mind.  They usually like
                      to surf the web, play on-line game, listen mp3 and watch videos.
                      How to teach these students in a very interesting way?
                      >
                      Why?  Do you want these nerds fooling with real software?
                      >
                      --
                       [mail]: Chuck F (cbfalconer at maineline dot net)
                       [page]: <http://cbfalconer.home .att.net>
                                  Try the download section.
                      >
                      --
                      Posted via a free Usenet account fromhttp://www.teranews.co m
                      If this is a must. If he/she is one of your good friends' son/
                      daughter. Is there a real interesting way?

                      Mike

                      Comment

                      • Ben Pfaff

                        #12
                        Re: interesting examples to learn C.

                        Richard Heathfield <rjh@see.sig.in validwrites:
                        Really, seriously. C is not for those who would rather be doing
                        something else. If you want to get someone "into" programming,
                        start with Lego Mindstorms (a programmable build-your-own-robot
                        kit).
                        I had a Lego Mindstorms set at one time. I never even installed
                        the software it came with. Instead, I programmed it in Not Quite
                        C, which is exactly what it sounds like. Great fun though.
                        --
                        Ben Pfaff

                        Comment

                        • m.w.kooiman@hccnet.nl

                          #13
                          Re: interesting examples to learn C.

                          On 3 apr, 06:55, Morris Dovey <mrdo...@iedu.c omwrote:
                          Richard Heathfield wrote:
                          >
                          Morris Dovey said:
                          >
                          Richard Heathfield wrote:
                          >
                          >Mike said:
                          >
                          ><snip>
                          >
                          If this is a must.  If he/she is one of your good friends' son/
                          daughter.  Is there a real interesting way [to learn C]?
                          >
                          >Don't start with C. Really, seriously. C is not for those who would
                          >rather be doing something else. If you want to get someone "into"
                          >programming, start with Lego Mindstorms (a programmable
                          >build-your-own-robot kit). If they aren't hooked by that, it's probably
                          >safest to assume that they aren't ever going to be programmers.
                          >
                          Hmm. Dunno about the 'not C' part. Do a Google search for legway.
                          It's a scaled down version of the self-balancing two-wheeled
                          Segway vehicle - built with Legos and uses a tiny (TurboC)
                          control program. The source code is freely available and there's
                          enough instant gratification to (perhaps) get 'em hooked.
                          >
                          The thing about RCX is that you can, quite literally, write programs with
                          your mouse, just by dragging Lego-shaped bricks around the place. No
                          syntax knowledge required (because the syntax is jigsaw-like - i.e. either
                          it fits or it doesn't, and you can tell just by looking). The only time
                          you have to type is when adjusting parameters (e.g. "spin this motor for
                          XX seconds", "rotate YY degrees", or whatever it is).
                          >
                          I am very happy to advocate C in appropriate circumstances, but this does
                          seem to be one of those times when the OP is treading a path that is
                          doomed to be unproductive.
                          >
                          I hear you - but I'm taking my best shot at the OP's rather
                          specific request (while not really disagreeing with you <g>).
                          >
                          Of course, the danger with the LegWay project is that they'll
                          probably want to follow up with full-size machines and entries
                          for Robot Wars.
                          >
                          Hmm - I wonder if it'd be possible to build a _one_ wheeled
                          (visualize unicycle) robot...
                          >
                          --
                          Morris Dovey
                          DeSoto Solar
                          DeSoto, Iowa USAhttp://www.iedu.com/DeSoto/
                          Yep it is possible: Here is a link to a lego unicycle:


                          Comment

                          Working...