Learn C Programming Language: Tips & Resources

In summary, The C Programming Language by Brian Kernighan and Dennis Ritchie is an excellent book for beginners learning C. It is concise, easy to read, and has helpful exercises.
  • #1
sanhuy
40
2
Hi all, I am looking to learn C by myself since it is a programming language that is used in my micro controllers class that i am going to take during the upcoming Spring semester at my university. I was wondering how i should go about doing this? I was thinking of using book The C Programming Langauge by Brian Kernighan and Dennis Ritchie. Would this be a good idea for a person that has only taken 1 cs class that was taught in C++ (intro cs class covered stuff like datatypes, variables, functions, arrays, flow of control, and loop.) Do you have any other suggestions of materials, such as online lecture courses, different textbooks or youtube videos, that i should use instead?

kind regards,
sanhuy
 
  • Like
Likes Dr. Courtney
Technology news on Phys.org
  • #2
That's the book I used to learn C. Worked well for me, but I was an experienced programmer when I started it.
 
  • #3
I think i may just use this book. I was skimming through the tutorial chapter, and it was written nice and concisely, with a few examples and exercises, just like textbooks should be written. It doesn't to give you 20 page introductions, which many textbooks do.

do you think the text and the exercises are good enough to learn the language or is there anything else that i should be doing?
 
  • #4
I think you should go through that book, THEN worry about what to do next. It really has all you need. It IS concise so you need to be careful that you don't go too fast or skip stuff.

I would also start WRITING simple (VERY simple) programs and add to them as you learn new things. I created a program called C PLAY that basically, by the time I was done, contained a usage of every construct in the book.
 
  • Like
Likes jedishrfu and jim mcnamara
  • #5
I agree with phinds that the K & R book is a good choice, especially since you have already had a class that was presented in C++. If you were coming into C as a complete novice, I might not suggest the K & R book.
 
  • Like
Likes jedishrfu
  • #6
Phinds said 'do not skip stuff'. He was very right. C has this nasty thing- it will let you write code that will do odd things, like crash unexpectedly. This nastiness is called 'undefined behavior'. It is hard to create in most upper level programming languages, awfully easy to do in C. Follow the book scrupulously. Code the way you learned from the book and life will be good.
 
  • Like
Likes jedishrfu
  • #7
I concur k&r is an excellent book to learn from. Its easy to read and very concise.
 
  • #8
Kernighan and Ritchie is the book by the people who originally defined C, so it is a good book. As a beginner, you may want more explanation in some places, but the internet can fill in where needed. In general, I think it is a good book for a beginner and will still be your main reference when you are an expert.
 
  • #9
What I also like is that the exercises are useful. You'll have to try and think about how certain functions you'll use very often actually work.
I haven't done most of them but when I read them I liked them more than the assignments we were given for the class that used the book.
 
  • #10
K&R is definitely a good book but if you want some things explained, I'd suggest Deitel's book "C How to Program". I studied through this book and some others as well when I was learning C and I found that it is particularly good at explanations of concepts, has many exercises and projects - particularly now with the LiveCode approach, helps to develop good programming habits in general and - with no intention by my side to advertise it, it is definitely an excellent book.
 

FAQ: Learn C Programming Language: Tips & Resources

What is C programming language?

C programming language is a high-level, general-purpose programming language that was developed in the early 1970s. It is a powerful language that is widely used for developing operating systems, embedded systems, and other complex software applications.

Why should I learn C programming language?

Learning C programming language can open up many career opportunities in the technology industry. It is also a great language to learn for building a strong foundation in computer science and programming concepts. Additionally, many other programming languages have been influenced by C, making it easier to learn and transition to other languages.

What resources can I use to learn C programming language?

There are many resources available for learning C programming language, including online tutorials, books, and video courses. Some popular resources include "The C Programming Language" by Brian Kernighan and Dennis Ritchie, "C Programming: A Modern Approach" by K. N. King, and "Learn C The Hard Way" by Zed A. Shaw.

Is C programming language difficult to learn?

C programming language can be challenging to learn, especially for beginners with no prior programming experience. However, with dedication and practice, it can be mastered. It is recommended to have a strong understanding of basic programming concepts before diving into C programming.

Are there any tips for learning C programming language?

Some tips for learning C programming language include practicing regularly, breaking down complex problems into smaller, manageable tasks, and seeking help from experienced programmers or online communities when needed. It is also important to read and practice code written by others to improve understanding and learn new techniques.

Back
Top