Top C Programming Books for Beginners: Expert Recommendations

Click For Summary

Discussion Overview

The discussion revolves around recommendations for books on learning C programming, particularly aimed at beginners. Participants share their opinions on suitable texts, the challenges of learning C, and alternative programming languages.

Discussion Character

  • Debate/contested
  • Technical explanation
  • Conceptual clarification

Main Points Raised

  • One participant suggests that C may not be the best first programming language due to its complexity, comparing it to "walking on a tight-rope."
  • Another participant recommends a specific book, linking to it, and expresses agreement with the previous suggestion.
  • Several participants inquire about the original poster's (OP) background in programming and their specific goals, asking about their operating system and whether they meant C or C++.
  • One participant mentions that learning C++ could be beneficial, as it teaches good programming skills beyond just the language.
  • A suggestion is made to use an IDE like Netbeans while programming in Linux to help with C programming details.
  • Another participant recommends "The Joy of C" as a more approachable alternative to K&R, arguing that K&R may be too heavy for casual learners.
  • There is a disagreement regarding the suitability of K&R for beginners, with some asserting it is well-written and accessible, while others argue it is not friendly for those starting from scratch.
  • One participant expresses concern about conflating C and C++ and emphasizes the importance of distinguishing between ANSI C and C++.
  • Another participant mentions using Visual Studio Express or MinGW for Windows users and shares a link to a guide for compiling on Ubuntu.
  • A participant recommends the GNU C Programming Tutorial as a good resource.

Areas of Agreement / Disagreement

Participants express differing opinions on the best books for learning C, with no consensus on whether K&R is suitable for beginners. There are also competing views on whether C or C++ is a better starting point for new programmers.

Contextual Notes

Participants discuss various programming environments and tools, highlighting the importance of context in choosing learning resources. There are unresolved questions about the best approach for beginners and the appropriateness of different texts.

AlexVGheo
Messages
28
Reaction score
1
Hi, could anyone recommend me a good book for learning C programming? I know that there are lots of good website but I would prefer a solid book, however without reading them before hand naturally I can't determine a good one!

So any advice on this specifically would be good thank you. Or any advice on learning C in general would be very welcome too
 
Physics news on Phys.org
Do you know anything about programming, or is it your first attempt to learn programming at all?
 
Borek said:
Do you know anything about programming, or is it your first attempt to learn programming at all?

Good question.
I don't recommend C as a first programming language, it's like learning to walk on a tight-rope. You can do amazing programming tricks with it using very limited resources but it's a maze of death-traps for beginners.
To the OP:
If you're not a new programmer then this is the book to start from.
https://www.amazon.com/gp/product/0131103628/?tag=pfamazon01-20
 
Borek said:
Do you know anything about programming, or is it your first attempt to learn programming at all?

Also, what is your environment, and what is your objective? Do you really mean C, or do you mean C++? Are you on Linux, or Windows, or something else? Do you plan to use gcc, or Visual C Express, or something else as a compiler? Do you want to become a professional programmer, or do you just want to write programs for yourself?
 
I was considering it more for a bit of fun, and I have done some programming in the past like VB and Ruby and a bit of Python. I am on Windows but I dual boot with Linux if that is a better environment for doing it on. I have never written in C but I have a friend who has been trying to learn so I know at least the basics of it, like 'if' and 'while', are much the same as what I have done before.

Ill have a look at that book you linked, thank you all for the help
 
Actually if you want to start with a C-like language, I would really recommend learning C++. It will also teach you things that are not directly related to the language but to good programming skills in general.
 
but I dual boot with Linux if that is a better environment for doing it on. I have never written in C but I have a friend who has been trying to learn so I know at least the basics of it, like 'if' and 'while', are much the same as what I have done before.


If you program while running Linux, using a IDE like Netbeans can help you with some of the many details of C (and other language) programming.

https://netbeans.org/
 
I would get the classic text:

31euHZManML.jpg


As for learning C++ as suggested by another poster, I would suggest keeping a strict separation in ones mind between ANSI C and C++ (which is not strictly a superset of C). It's common for people to conflate the two. Most C code out there is standard ANSI code. If you're collaborating with other people, mixing the two will probably not be appreciated. Compilers and tools usualy have a way to make sure your code follows the ANSI standard (e.g. -ansi switch in gcc).
 
  • #10
Isn't K&R a bit too heavy for someone willing to learn C for fun?
I would suggest this book:
Miller, Quilici
The Joy of C
519uKIrMeaL._BO2,204,203,200_PIsitb-sticker-arrow-click,TopRight,35,-76_AA300_SH20_OU01_.jpg

https://www.amazon.com/dp/047112933X/?tag=pfamazon01-20
(it's a bit pricey now, but look at the used copies)

It gives a step by step introduction to the language and it's not one of those "hello boys and girls, I am your new teacher so let's start looking at some funny pictures to motivate you before starting to give you - in chapter 85 - some useful information". And yet, you can almost hear someone playing the ukulele in the background.

K&R can be a useful reference, but starting with that... ugh.
 
  • #11
SredniVashtar said:
Isn't K&R a bit too heavy for someone willing to learn C for fun?

K&R can be read by anyone still in high school. It is very well written, accessible and short.

As for the above recommendation to start with C++, it's a terrible suggestion.
 
  • #12
econreader said:
K&R can be read by anyone still in high school. It is very well written, accessible and short.

I don't dispute that. But it's not exactly a very friendly text to start learning C from scratch.

As for the above recommendation to start with C++, it's a terrible suggestion.

The OP question was "Hi, could anyone recommend me a good book for learning C programming?"
I must have missed a step (the one with the increment).
 
  • #13
SredniVashtar said:
The OP question was "Hi, could anyone recommend me a good book for learning C programming?"
I must have missed a step (the one with the increment).

A lot of people seem to think there's a language called C/C++. I blame Microsoft.
 
  • #14
AlexVGheo said:
I was considering it more for a bit of fun, and I have done some programming in the past like VB and Ruby and a bit of Python. I am on Windows but I dual boot with Linux if that is a better environment for doing it on.

For windows, you can download and use Visual Studio Express for free. Or MinGW if you want something open source.

Here's a howto for Ubuntu, which will probably work for other Debian derivatives:

https://help.ubuntu.com/community/CompilingEasyHowTo

These days I never write C code. I use Python's ctypes module to interface with C DLLs and cython to speed up bottlenecks in my Python code. I still need to read legacy C code, though.
 

Similar threads

  • · Replies 9 ·
Replies
9
Views
12K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 16 ·
Replies
16
Views
2K
  • · Replies 0 ·
Replies
0
Views
1K
  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 6 ·
Replies
6
Views
5K
Replies
4
Views
2K
Replies
21
Views
13K
Replies
5
Views
3K