Suggested books to supplement learning C and C++ programing?

In summary: C++ is basically C with object-oriented programming added on, which is why it may not be a good idea to start with it if you're not already familiar with procedural programming.OK, that makes sense. We're essentially saying the same... that C++ is basically C with object-oriented programming added on, which is why it may not be a good idea to start with it if you're not already familiar with procedural programming.
  • #1
KonaGorrila
12
0
Aloha, I am wanting to teach myself C and C++ programming languages and before I purchase any books or materials on the subject. I would like to see if anyone has any recommendations?, and the pros and cons if any, ect.
 
Technology news on Phys.org
  • #2
KonaGorrila said:
I am wanting to teach myself C and C++
I recommend that you choose one and stick with it long enough to be comfortable with at least its basic features, before starting on the other one. Even though C++ evolved from C, as a sort of "C with object-oriented programming added on", there are significant differences even at the beginning level (i.e. C versus C++ without the object-oriented stuff). You'll probably get confused if you switch between C and C++ books or tutorials.

I used to teach an intro programming course using C++, but it was long enough ago that I'm not familiar with the currently available books etc.

Are you new to programming, or are you already acquainted with some other procedural programming language? (e.g. Python, Fortran, BASIC, Java,...)
 
  • #3
If you know some programming then I recommend you get the White Book

https://www.amazon.com/dp/0131101633/?tag=pfamazon01-20

and just do programming examples yourself as you move through the book

If you do NOT already know some programming then the White Book may be too dense and you should probably find something else.
 
  • Like
Likes jim mcnamara and FactChecker
  • #4
  • #6
KonaGorrila said:
Aloha, I am wanting to teach myself C and C++ programming languages and before I purchase any books or materials on the subject. I would like to see if anyone has any recommendations?, and the pros and cons if any, ect.

Your background, your goal(s) and the time you can / are willing to spend are the crucial factors. In any case, learning C is a worthy thing to do, that will pay you back in the future. On the other hand, according to your experience and goal(s), it may be a better suit to dive directly into C++.

For textbooks, if you are now beginning programming, I recommend Deitel's books for C and C++. These books serve very well if you're not a beginner too but in this case I also recommend the book that phinds and Mark44 do.
 
  • #7
QuantumQuest said:
... according to your experience and goal(s), it may be a better suit to dive directly into C++.
You might be right but personally, I cannot IMAGINE how this would be a good idea regardless of experience and goals. The underlying syntax of C++ IS C and adding in OPP concepts at the start just confuses things and detracts from learning the language.
 
  • #8
phinds said:
You might be right but personally, I cannot IMAGINE how this would be a good idea regardless of experience and goals. The underlying syntax of C++ IS C and adding in OPP concepts at the start just confuses things and detracts from learning the language.

Yes, I agree if someone is taught this way but what I mean is learning directly C++, beginning only from the pure procedural things and then learning about objects (late objects approach). This, as far as I know, is done in a number of schools or even a self learner can follow the approach. So, effectively someone learns C aspects of C++ and then goes on to OOP. The difference is that learner goes in a faster pace than learning pure C first and it may work well if someone wants to work with OO C++ as soon as possible - although "soon" here is fairly long anyway.
 
  • #9
QuantumQuest said:
Yes, I agree if someone is taught this way but what I mean is learning directly C++, beginning only from the pure procedural things and then learning about objects (late objects approach). This, as far as I know, is done in a number of schools or even a self learner can follow the approach. So, effectively someone learns C aspects of C++ and then goes on to OOP. The difference is that learner goes in a faster pace than learning pure C first and it may work well if someone wants to work with OO C++ as soon as possible - although "soon" here is fairly long anyway.
OK, that makes sense. We're essentially saying the same thing.
 
  • Like
Likes QuantumQuest
  • #10
When I taught C++, I did not start on object-oriented programming (object design and implementation) until the second semester. The complexity of OOP programming is not an issue until you start to tackle problems where OOP is helpful.

In my opinion the non-OOP subset of C++ is easier for beginning programmers to handle, in some respects, than C. First, C++ iostreams are easier to use for simple input and output than C's I/O functions. Second, C++'s standard string data type is easier to use than C's char arrays, especially if you want dynamically sized strings. Third, C++'s vectors have some advantages over C's arrays in general, especially (again) if the desired size is not known until run-time. (Maybe C has caught up in this area since the mid 2000s? I know there have been new versions of both the C and C++ standards since then.)
 
  • #11
jtbell said:
I recommend that you choose one and stick with it long enough to be comfortable with at least its basic features, before starting on the other one. Even though C++ evolved from C, as a sort of "C with object-oriented programming added on", there are significant differences even at the beginning level (i.e. C versus C++ without the object-oriented stuff). You'll probably get confused if you switch between C and C++ books or tutorials.

I used to teach an intro programming course using C++, but it was long enough ago that I'm not familiar with the currently available books etc.

Are you new to programming, or are you already acquainted with some other procedural programming language? (e.g. Python, Fortran, BASIC, Java,...)
I am sufficient in MatLab and have started to pick up some of python. My purpose is using programming skills in my family business, I want to learn C++ and C. I will be programing micro controllers at first but want to get into more than that so feel C++ would be more beneficial in the long run.
 
  • #13
Thanks ChrisVer, I really appreciate the links they are very helpful!
 
  • #14
KonaGorrila said:
Aloha, I am wanting to teach myself C and C++ programming languages and before I purchase any books or materials on the subject. I would like to see if anyone has any recommendations?, and the pros and cons if any, ect.
There a lot of free courses on coursera: https://www.coursera.org/courses?languages=en&query=c+programming

Here is a list of the best books for C for all lvls: https://stackoverflow.com/questions/562303/the-definitive-c-book-guide-and-list
and for C++: https://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list
 
  • #15
KonaGorrila said:
I am sufficient in MatLab and have started to pick up some of python. My purpose is using programming skills in my family business, I want to learn C++ and C. I will be programing micro controllers at first but want to get into more than that so feel C++ would be more beneficial in the long run.
If you are going to be programming microcontrollers then you will most likely not be using C++.

Edit: C and C++ are different languages and should be treated as such. If you need to immediately program microcontrollers, learn C. You can learn C++ later when you need to do other things (I recommend "Accelerated C++" for this. It teaches C++ and not "C with classes")
 
  • Like
Likes jim mcnamara
  • #16
Let's let this thread go to rest. @vancouver_water pointed out something very important C and C++ are not alike and lead to confusion trying to learn both at the same time.
 
  • Like
Likes ISamson

Related to Suggested books to supplement learning C and C++ programing?

1. What are the best books for learning C and C++ programming?

Some popular books for learning C and C++ programming include "The C Programming Language" by Brian Kernighan and Dennis Ritchie, "C++ Primer" by Stanley B. Lippman, and "Effective C++" by Scott Meyers.

2. Are there any beginner-friendly books for learning C and C++?

Yes, "C Programming Absolute Beginner's Guide" by Greg Perry and Dean Miller and "C++ for Dummies" by Stephen R. Davis are both good options for beginners.

3. Are there any books that focus specifically on data structures and algorithms in C and C++?

Yes, "Data Structures and Algorithms in C++" by Adam Drozdek and "Data Structures and Algorithms Made Easy in C++" by Narasimha Karumanchi are both popular choices.

4. Are there any books that cover both C and C++ programming languages?

"C and C++ Programming: Step-by-Step Beginner's Guide for Computer Science Students" by Nathan Clark and "C/C++ Programming Language Crash Course" by Martin Laredo both cover both languages.

5. Are there any books that offer exercises and practice problems for C and C++ programming?

Yes, "C and C++ Programming Exercises: Learn by Doing" by Professor N. S. Kutti and "Problem Solving in C and C++" by Mark Allen Weiss both offer exercises and practice problems for hands-on learning.

Similar threads

  • Programming and Computer Science
2
Replies
69
Views
4K
  • Programming and Computer Science
Replies
8
Views
910
  • Programming and Computer Science
Replies
15
Views
1K
  • Programming and Computer Science
Replies
17
Views
1K
  • Programming and Computer Science
Replies
2
Views
1K
  • Programming and Computer Science
Replies
16
Views
1K
  • Programming and Computer Science
Replies
1
Views
743
  • Programming and Computer Science
12
Replies
397
Views
14K
  • Programming and Computer Science
2
Replies
49
Views
3K
  • Programming and Computer Science
Replies
8
Views
1K
Back
Top