One of my sons is looking to learn programming, these two books seem to be the most recommended.
With your expertise, which one would you recommend for having a solid foundation in C?
One of my sons is looking to learn programming, these two books seem to be the most recommended.
With your expertise, which one would you recommend for having a solid foundation in C?
What sort of age range are we talking about here?
FWIW, C isn't a good first language to learn.
Start with Python.
It will teach some good habits, and you can get an awful lot done quite quickly without worrying about a lot of low-level detail.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
Personally I never got a book, I just dove in head 1st with template files and learned by trial & error & reference & occasional tutorial, Just get codeblock downloaded onto his/your pc and get him started with making a calculator, for GUI just use an open source library like IUP and that should be enough for him to learn most of the basic concepts, everything else he'll seek out on his own.
@elonmusk
The two books I recommend are as follows:
C Programming, A Modern Approach
Author: K. N. King
C Primer Plus, 6th Edition
Stephen Prata
Either one would do fine. Study every chapter, and do all the exercises at the end of each chapter.
Please stay away from online tutorials & YouTube videos. They are painfully insufficient, and in some cases wrong. You also can't learn the language simply by trial & error!
I wish your son well!
"...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson
/me checks out elon's apparent "birthday" on the mod page and laughs....
Why do I get the feeling the person who really wants to learn C is you?
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
I agree with Salem: "C isn't a good first language to learn". It is a good language to learn at some point, hopefully earlier rather than later, because knowing C will help you understand programming better as C tends to be closer to the machine than most other languages that you will commonly encounter while still being a "high level language", but the core of the craft is not so much programming languages themselves than it is things like "computational thinking", and that's better initially served with languages like Python.Originally Posted by elonmusk
Having said that, if you insist on C, then having perused an online copy of part of "C Programming: A Modern Approach", I can say it seems reasonably good: none of the obvious problems that exist with some of the beginner-friendly-but-bad-content C introductory books out there.
That's a common way to learn a subsequent programming language, but you're saying that that's the approach you took for your initial programming language? I suspect that you took much longer to plug the gaps in your learning than if you had followed a structured introductory book/tutorial (or class, in which case it would likely be notes/slides). That is, an approach might have worked for you, but that doesn't mean that another approach wouldn't have been better when you don't have prior programming knowledge.Originally Posted by awsdert
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
I don't think I ever said that was my initial programming langauge, I started off with VB6 in college (don't think I ever actually questioned integers and pointers beyond how it is actually represented, was at least 12-14 years ago), I then moved onto javascript on a later module and boy did I love that, felt so liberating in comparison to VB, still don't remember questioning any concepts beyond how to "talk" to the system I was on, probably developed flexible thinking unintentionally at that time, definitely my habit to make portable code whenever I can
Ah, I thought it was good to check because elonmusk indicated that he (or his probably imaginary son) wants to learn C as his first programming language, so it sounded like you were speaking from a similiar experience... whereas it turns out that you initially learnt programming in the structured environment of college, so your advice actually comes with that previously unstated caveat.Originally Posted by awsdert
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)