Top C Programming Books for Beginners: Expert Recommendations

In summary, the question is for someone who is a new programmer and wants to start with a C-like language.
  • #1
AlexVGheo
28
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
  • #2
Do you know anything about programming, or is it your first attempt to learn programming at all?
 
  • #3
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
 
  • #5
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?
 
  • #6
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
 
  • #7
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.
 
  • #8
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/
 
  • #9
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.
 
  • #15

Related to Top C Programming Books for Beginners: Expert Recommendations

1. What are the best C programming books for beginners?

There are several great C programming books for beginners, but some of the most highly recommended ones by experts include "The C Programming Language" by Brian W. Kernighan and Dennis Ritchie, "C Programming: A Modern Approach" by K. N. King, and "Head First C" by David Griffiths and Dawn Griffiths.

2. Are there any specific books for learning C programming for non-programmers?

Yes, there are some books that are specifically designed for non-programmers to learn C programming. Some examples include "C Programming Absolute Beginner's Guide" by Greg Perry and Dean Miller, and "C Programming for the Absolute Beginner" by Michael Vine.

3. Are there any online resources that can supplement these books?

Absolutely! In addition to books, there are plenty of online resources such as tutorials, forums, and video courses that can supplement your learning from C programming books. Some popular ones include Codecademy, Udemy, and Coursera.

4. Can these C programming books be used for self-study?

Yes, these books are great for self-study as they are designed to guide beginners through the basics of C programming. However, it is always beneficial to have a mentor or join a study group to supplement your learning and ask any questions that may arise.

5. Is it necessary to have any prior programming experience to learn C?

No, it is not necessary to have any prior programming experience to learn C. However, having a basic understanding of programming concepts can make the learning process smoother. These C programming books are designed for beginners and will guide you through the fundamentals of programming in C.

Similar threads

  • Science and Math Textbooks
Replies
7
Views
746
  • Science and Math Textbooks
Replies
10
Views
1K
  • Science and Math Textbooks
Replies
16
Views
1K
  • Science and Math Textbooks
Replies
6
Views
896
Replies
5
Views
1K
  • Science and Math Textbooks
Replies
5
Views
2K
Replies
4
Views
1K
Replies
4
Views
843
  • Science and Math Textbooks
Replies
12
Views
2K
  • Science and Math Textbooks
Replies
15
Views
2K
Back
Top