Programmers - Coding in C

Go to page

Space Marshal

For those of you with established knowledge and careers in the coding/programming industry, lend me your wisdom!

As some of you may or may not be aware of, I am currently in college working towards a degree in computer sciences. As I approach the completion of the general education curriculum, I will have to start working on the nitty gritty classes of the major. The initial programming classes starts teaching students in C and I believe they can branch out and teach other languages once the initial introductory classes are out of the way. I have a vague understanding of how coding works and would be considered very new to programming.

So my question is, are there any textbooks or perhaps websites I could get a head start with learning C? I would prefer if the book could be found on amazon.com for ease of acquirement, but am willing to look outside that source.

Space Kitty

EDx has several excellent courses on C but they tend to be paid courses. They do offer certifications for completion though.

Like @Deroth said Microsoft Virtual Academy is a great resource as well.

Code Academy has a really good Intro to C++ course they was just posted a few weeks ago. I have not personally completed it but I have heard good things from a friend who teaches highschool Computer engineering.

EDx has several excellent courses on C but they tend to be paid courses. They do offer certifications for completion though.

Like @Deroth said Microsoft Virtual Academy is a great resource as well.

Code Academy has a really good Intro to C++ course they was just posted a few weeks ago. I have not personally completed it but I have heard good things from a friend who teaches highschool Computer engineering.

"To simplify your tech training journey, we are consolidating our learning resources and retiring Microsoft Virtual Academy in phases, beginning on January 31, 2019. Complete site retirement is scheduled for later in 2019. Check your MVA Dashboard frequently for courses you have started that are retiring. To earn your certificates of completion, be sure to finish any courses by January 31, 2019. For more learning options, check out Microsoft Learn. "
Ruh roh, i saw this at the top of their website...

Moderator

It was 28 years ago that I learned C, so I'm afraid I'm not sure about recent media covering the topic of learning in C. However O'Reilly was a fantastic resource back then and so I've listed out a few of their books:

In general what worked for me as a self-learner was to buy as many books as I could get my hands on, and read them all. After a while you'll notice there are many similarities between them and you can safely ignore those parts once you know them by heart. Thereafter it's easy to see the differences in each book, sometimes they have some fun tricks, sometimes one sheds insight into an area that another ignored, etc.

Rear Admiral

If you are interested in learning C# and want a video crash course, here's a link from my earlier class. He's from Denmark so his english is not perfect, but it's 10 times more engaging for me than reading in a book. Theres a lot of videos, he shows step by step how to create a backend in C# and explains the how's and why's and he even shows you what to install and how to do it beforehand on both Windows & Mac. He creates a simple app and keeps expanding on it (you can try it yourself while watching the videos, so in the end you will actually have a functional REST API that you can expand upon) - he also has guides for building a frontend with Angular.

Space Marshal

It was 28 years ago that I learned C, so I'm afraid I'm not sure about recent media covering the topic of learning in C. However O'Reilly was a fantastic resource back then and so I've listed out a few of their books:

In general what worked for me as a self-learner was to buy as many books as I could get my hands on, and read them all. After a while you'll notice there are many similarities between them and you can safely ignore those parts once you know them by heart. Thereafter it's easy to see the differences in each book, sometimes they have some fun tricks, sometimes one sheds insight into an area that another ignored, etc.

If you are interested in learning C# and want a video crash course, here's a link from my earlier class. He's from Denmark so his english is not perfect, but it's 10 times more engaging for me than reading in a book. Theres a lot of videos, he shows step by step how to create a backend in C# and explains the how's and why's and he even shows you what to install and how to do it beforehand on both Windows & Mac. He creates a simple app and keeps expanding on it (you can try it yourself while watching the videos, so in the end you will actually have a functional REST API that you can expand upon) - he also has guides for building a frontend with Angular.

Not sure what the main differences are between the different types of C programming, but my upcoming class focuses on C specifically, not C#. But if the languages are practically the same, I will have to give this a try.

Rear Admiral

Not sure what the main differences are between the different types of C programming, but my upcoming class focuses on C specifically, not C#. But if the languages are practically the same, I will have to give this a try.

C# is object oriented like Java where you have classes with specific tasks. It's a different way of structuring apps. Some of the code syntax is similar to C, but it's still very different afaik even though I have never done C or C++. But since you are just starting up and you only need C, I would suggest learn that first. After that you can maybe look into object oriented programming.

Vice Admiral

It was 28 years ago that I learned C, so I'm afraid I'm not sure about recent media covering the topic of learning in C. However O'Reilly was a fantastic resource back then and so I've listed out a few of their books:

I originally learned C in college in the late 80's. I'm surprised no one has linked this yet (maybe I missed it). At the time this was the bible for the original C Language, and probably the source of the now famous "Hello, World" first program in C. Kernighan and Ritchie are the gods of C Language. I think they wrote most of it originally, as well as the original C compiler.

Moderator

Since you're just learning, I would stay away from other languages like C++ and C# for now.

In all honesty, I'm surprised your course is dealing with C at all, it's a legacy language that you won't ever actually want to use unless it's required for backwards compatibility in a very old system. It's ok for learning tho.

If you are given the opportunity, C# is much better than C, unless you need absolute maximum performance in which case C++ is the tool of choice.

But I digress. Though C++ and C# are syntactically similar to C, as a beginner you will only find those differences confusing and frustrating. Stick to C books if that's the language your prof requires you to learn.

Admiral

Since you're just learning, I would stay away from other languages like C++ and C# for now.

In all honesty, I'm surprised your course is dealing with C at all, it's a legacy language that you won't ever actually want to use unless it's required for backwards compatibility in a very old system. It's ok for learning tho.

If you are given the opportunity, C# is much better than C, unless you need absolute maximum performance in which case C++ is the tool of choice.

But I digress. Though C++ and C# are syntactically similar to C, as a beginner you will only find those differences confusing and frustrating. Stick to C books if that's the language your prof requires you to learn.

I was surprised as well it seems all of the universities near here teach java as their intro to programming. Not that learning C is a bad thing as it will teach you why things work the way they do in C# and Java.

At this point I am not sure I would worry to much about reading lots of books on C code or learning its nuances and syntax as most of the class time will be spent learning how to think about tasks after they give you a quick crash course in basic syntax.

Commander

Here are my 2 cents. When you're new at programming don't be overwhelmed by the many different languages out there. Once you learn the structure of programming and how the logic flows through the coding in one language, every other language will be very easy to learn.

IMHO, C isn't a high level language in today's term and definitely isn't low level, I would place it as a medium level. It is a great place to start. As you master C, object oriented methodologies will be an easy task to tackle later on.

Admiral

I also recommend Kernihan & Ritchie "The C Programming Language", 2nd edition. Keep it as a reference for after you graduate too. People don't understand that programming language viability is more to do with utility, and has nothing to do with age of the language. C language is the father of C++, and several other languages, and is the grandfather of Java and C#. That is why they are teaching it. You will learn the foundation of procedural programming and from there you will branch off to do whatever you want to do, including object oriented programming (OOP). Quite literally, object oriented programming is not the panacea it is made out to be by its proponents, especially if you have no experience with procedural programming. OOP has a place to be sure, but it should not be your starting point for a computer science major.

Remember this. You will not be just a programmer when you graduate. Although programming will be a large part of what you do, it will be just one of many tools at your disposal. You'll be dealing with software at a fundamentally different level than programmers in your career.

If Kernihan & Ritchie is provided by the school (that is actually likely in some schools) or if you're looking for more practical tools, then you might want to look at a book like

Advanced C Programming by Example, by John W. Perry

Expert C Programming: Deep C Secrets by Peter van der Linden

Computer Systems: A Programmer's Perspective by David Bryant, Randal O'Hallaron.

C: A Reference Manual by Samuel P. Harbison and Guy L. Steele Jr.

The three books in orange can be obtained from Amazon as a package, for a discount, I think the total is somewhere between $130-135 US. The other books are good too, it was just the package.... I like packages when I can afford them.

Space Marshal

C# is object oriented like Java where you have classes with specific tasks. It's a different way of structuring apps. Some of the code syntax is similar to C, but it's still very different afaik even though I have never done C or C++. But since you are just starting up and you only need C, I would suggest learn that first. After that you can maybe look into object oriented programming.

I originally learned C in college in the late 80's. I'm surprised no one has linked this yet (maybe I missed it). At the time this was the bible for the original C Language, and probably the source of the now famous "Hello, World" first program in C. Kernighan and Ritchie are the gods of C Language. I think they wrote most of it originally, as well as the original C compiler.

Since you're just learning, I would stay away from other languages like C++ and C# for now.

In all honesty, I'm surprised your course is dealing with C at all, it's a legacy language that you won't ever actually want to use unless it's required for backwards compatibility in a very old system. It's ok for learning tho.

If you are given the opportunity, C# is much better than C, unless you need absolute maximum performance in which case C++ is the tool of choice.

But I digress. Though C++ and C# are syntactically similar to C, as a beginner you will only find those differences confusing and frustrating. Stick to C books if that's the language your prof requires you to learn.

I was surprised as well it seems all of the universities near here teach java as their intro to programming. Not that learning C is a bad thing as it will teach you why things work the way they do in C# and Java.

At this point I am not sure I would worry to much about reading lots of books on C code or learning its nuances and syntax as most of the class time will be spent learning how to think about tasks after they give you a quick crash course in basic syntax.

Here are my 2 cents. When you're new at programming don't be overwhelmed by the many different languages out there. Once you learn the structure of programming and how the logic flows through the coding in one language, every other language will be very easy to learn.

IMHO, C isn't a high level language in today's term and definitely isn't low level, I would place it as a medium level. It is a great place to start. As you master C, object oriented methodologies will be an easy task to tackle later on.

Thanks for the wise words! I am just following the curriculum/degree plan for my major. And I am no youngin' ..... did 10 years in the military and am now using my G.I. Bill to go to school. It feels so weird going to school as an already established adult.

I also recommend Kernihan & Ritchie "The C Programming Language", 2nd edition. Keep it as a reference for after you graduate too. People don't understand that programming language viability is more to do with utility, and has nothing to do with age of the language. C language is the father of C++, and several other languages, and is the grandfather of Java and C#. That is why they are teaching it. You will learn the foundation of procedural programming and from there you will branch off to do whatever you want to do, including object oriented programming (OOP). Quite literally, object oriented programming is not the panacea it is made out to be by its proponents, especially if you have no experience with procedural programming. OOP has a place to be sure, but it should not be your starting point for a computer science major.

Remember this. You will not be just a programmer when you graduate. Although programming will be a large part of what you do, it will be just one of many tools at your disposal. You'll be dealing with software at a fundamentally different level than programmers in your career.

If Kernihan & Ritchie is provided by the school (that is actually likely in some schools) or if you're looking for more practical tools, then you might want to look at a book like

Advanced C Programming by Example, by John W. Perry

Expert C Programming: Deep C Secrets by Peter van der Linden

Computer Systems: A Programmer's Perspective by David Bryant, Randal O'Hallaron.

C: A Reference Manual by Samuel P. Harbison and Guy L. Steele Jr.

The three books in orange can be obtained from Amazon as a package, for a discount, I think the total is somewhere between $130-135 US. The other books are good too, it was just the package.... I like packages when I can afford them.