interesting examples to learn C.

M

Mike

Hi

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

Mike
 
R

Richard Heathfield

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
 
C

Chris McDonald

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


But, of course, if you wish to learn C (as you originally asked), you
may prefer to not follow Richard's recommendation of Deitel & Deitel
for, as you can see from:

http://www.mypearsonstore.com/bookstore/product.asp?isbn=0132404168&xid=PSED

chapters 18-27 (pp666-1062) are entitled:

18 C++ as a Better C; Introducing Object Technology 666
19 Introduction to Classes and Objects 701
20 Classes: A Deeper Look, Part 1 744
22 Operator Overloading 827
23 Object-Oriented Programming: Inheritance 868
24 Object-Oriented Programming: Polymorphism 921
25 Templates 976
26 Stream Input/Output 996
27 Exception Handling 1038
 
R

Richard Heathfield

Chris McDonald said:
But, of course, if you wish to learn C (as you originally asked), you
may prefer to not follow Richard's recommendation of Deitel & Deitel

Have you read it?
for, as you can see from:

http://www.mypearsonstore.com/bookstore/product.asp?isbn=0132404168&xid=PSED

chapters 18-27 (pp666-1062) are entitled:

18 C++ as a Better C; Introducing Object Technology 666
19 Introduction to Classes and Objects 701
20 Classes: A Deeper Look, Part 1 744
22 Operator Overloading 827
23 Object-Oriented Programming: Inheritance 868
24 Object-Oriented Programming: Polymorphism 921
25 Templates 976
26 Stream Input/Output 996
27 Exception Handling 1038

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.
 
C

Chris McDonald

Richard Heathfield said:
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)
 
R

Richard Heathfield

Chris McDonald said:
Moderate skimming.


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.)
 
C

Chris McDonald

Richard Heathfield said:
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.
 
F

Flash Gordon

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.
 
C

CBFalconer

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?

Why? Do you want these nerds fooling with real software?
 
M

Mike

Mike wrote:

... snip ...


Why?  Do you want these nerds fooling with real software?

If this is a must. If he/she is one of your good friends' son/
daughter. Is there a real interesting way?

Mike
 
B

Ben Pfaff

Richard Heathfield said:
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.
 
M

m.w.kooiman

Richard said:
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...

Yep it is possible: Here is a link to a lego unicycle:

 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top