Best Book for learning C & C++ (again)

I am currently about 300 pages into the C++ Primer Plus 6th Ed. and after reading about the new C++ standard "C11 ?" Vs C99 I am wondering> The book is easy to use/read but the programming examples are for the most part several miles away in certain details cin, cout, end1 are all very useful but it seems like the book is a generation beyond the language used with the Arduino... is there a better one... after reading a half a dozen different books for a hundred pages or so it is this one or C in a nutshell that make the most sense to me.


My personal favorite C book is K&R. But it's just plain C, no C++.

I date back to before OOP, and I learned C from the first edition of K&R. I picked up OOP on my own, but I like I got a copy of Stroustrup and I'm glad I have it, but it is very computer-sciencey if that's a word. Not that that's a bad thing but it can be a lot to wade through sometimes. I wish I understood it at that level. Maybe some day.

Folks will debate whether a person should learn C before C++ or not. Interesting question but a moot point for me.

Kelley and Pohl’s A Book on C has mostly C, but some C++.
More accessible than K&R and waaay more understandable than Stroustrup.

I will get that book, If I don't already have it... Thank You. BTW what is wrong or too, too about the Primer, I like his writing style much better than the C++ for business book I was reading... A bunch more educational I think... At least it seems that I learn more It took me 4 days an hour in the morning to read 250 pages... hard wading that pool and 3 days to read 350 pages (of 1440) of the Primer. Not so very hard at my age... (sigh) to learn but what is hard is to synthesize thoughts from whole cloth. To take similar but disconnected concepts and see a logical connection between them. ... (sigh) but it is real good to be alive and participate in this forum...


Different things work for different folks. For me, K&R's style is close to ideal. It is short; the first edition was even shorter. I thought it was easy to read, but at the same time it is certainly not fast to read. I guess I'd say I basically had to study it as opposed to reading it. Just my opinion FWIW, I don't expect everyone to share it.

Kernighan and Ritchie developed the C language. I use the first edition of their book, it's so well used the sellotape holding the pages on has gone brown and been sellotaped over. You can work through the book and learn the language or use it as a reference. I think it would serve as a good manual for use with the Arduino.

C++ is a very different language and more complex.

or use it as a reference

Didn’t the first edition have the old-style, no-longer-supported function prototypes? e.g.

int foo (bar)
int bar;
  /* Body of function */

AWOL: Didn't the first edition have the old-style, no-longer-supported function prototypes?

Yes, I believe so.