It's not cheap, but C Programming a modern approach is very good.
All you need to get started is a text editor and a compiler. Which ones they are depends on your platform.
As someone said, books are next level to learn. There is not just one book, it depends what you are studying. Subjects like Data Structures and Algorithms in C, System Calls ... has its own book. For general knowledge of C that goes beyond while/for, at my university we used this book and it was really good. C Programming, A modern approach
The best advice is not to worry about it for the time being and just code along. These things are required to get the program working and are usually explained later on as you have more of the information that you need to understand them.
For example, what does the # in #include do?
In C, a word starting with # is a compiler directive. It simply tells the compiler to do something. In the case of #include <stdio.h> it is saying put the contents of the file stdio.h (which you'll find in one of the usual places) here. Why do we do this? A file with the extension .h is a header file. These contain function prototypes so that you can use the functions in your code. If you've not been introduced to the compiler, functions or prototypes, that'll probably leave you with more questions than it answered.
Incidentally, C Programming, A modern approach is well worth the investment.
>I guess you dont know program. Its an array in most programming language!
I recommend you C-Programming-Modern-Approach-2nd by King as it teaches in a way that you feel to be in a class course, high detailed and cover both C99 and C89 as C libraries!
NOPE. Its outdated (c89) and its approach rush on essential concepts not explaining them in minor details.
I loved King's book because he explains C as in his classes (Georgia State University):
I checked out a discussion about K&R the other day. Eventhough it is a classic in programming litterature, it seems like it is a good idea to pick an other book for starting to learn C for you. The recommendation I found was C programming, a modern approach. Here is an example link. https://www.amazon.com/C-Programming-Modern-Approach-2nd/dp/0393979504
I'm a big fan of K&R C, but if you're looking for something more modern and detailed, take a look at King's C Programming: A Modern Approach, 2nd Ed.. Also check out /r/C_programming.
I'm going to agree with /u/veggietoshi about your list. It won't kill you to read them but I think you'll appreciate their contents more after you have a little coding under your belt. Many are great books, but perhaps a quick read first and then go back to them later for more detailed understanding.
Shit. I have another book that I was planning on reading after. Should I finish this current textbook and use it as a little intro than go onto C: A modern approach? Or just cut my losses and move on?
I had 162 and 225 this term. I really enjoyed 162 but am glad 352 is behind me, even though it was an easy class. I am feeling pretty solid with object-oriented programming and much more solid on pointers--162 helped out a lot on both of those subjects. I'm also feeling ready for data structures. Unfortunately, I ended up with a pretty crappy group for 352, which is all group work. A couple of them contributed regularly, but we had one dude who literally did nothing the entire time.
There were times when I was feeling a little burnt out this past term. All of those feelings occurred when I had to force myself to do work for 352, though, which I did not find interesting at all. When I was coding my assignments, I was very happy. :)
As for the summer, I am headed out to Oregon today to attend the career showcase on Monday. I start 261 in a couple of weeks--I'm trying to get through as much of this book as I can before class starts:
http://www.amazon.com/Programming-Modern-Approach-2nd-Edition/dp/0393979504
Still very happy in the program overall.
Yep, get a book. C Programming: A Modern Approach by K.N. King is pretty highly regarded. It depends on how comfortable you are with C right now though.
> C: The C Programming Language is a classic of computer science that is revered as much for its writing as for what it actually teaches you about C. I do not recommend any book that weighs more than 5 pounds and exhaustively explains any library.
I would suggest the OP read something like "C: A Modern Approach" which at least covers C99 instead of a book that's twenty-seven years old. The K&R book is a classic, but it's also a relic; C has changed over the decades and K&R is much less relevant today as a result, in my opinion.
The book C Programming: A Modern Approach focuses on using external libraries, autotools, makefiles etc. in it's first chapters. It's not so much about the C language itself.
I think you should learn C or C++. This is my favorite C book for beginners, it's kind of old but still good http://www.amazon.com/C-Programming-Modern-Approach-2nd/dp/0393979504/ref=sr_1_sc_1?ie=UTF8&qid=1431198282&sr=8-1-spell&keywords=c+programming+a+moder+approach
A really good book on C is this one: C Programming: A Modern Approach by K N King (Author).
Well, the question is: what do you WANT to learn?
If it's how programs flow and how to create small applications that do specific tasks, I suggest Python. There are plenty of tutorials on them internets and you'll be up and running pretty fast. It's interpreted, which means you can literally type the code into a terminal line by line and it will execute as you go, which is great for learning the basics.
If it's how programs actually work, I strongly suggest C. Even C++ is too abstracted; to the untrained eye, the code will seem "magical" even if you know how to use it. Learning C will get you MUCH closer to the actual program. It's also the simplest language you will ever learn; it's basically just shorthand for assembly. This is a great book for learning C, and you can probably get it used for rather cheap: http://www.amazon.com/C-Programming-Modern-Approach-2nd/dp/0393979504/ref=sr_1_3?ie=UTF8&s=books&qid=1273540845&sr=8-3
If it's how computers run programs, you need to learn assembly. This is much less practical, but definitely worth learning if only for experience's sake. Every programming language is literally being translated into some form of assembly, so if you understand how assembly works, you'll understand completely how programs work. I suggest learning PIC assembly, as the documentation is great.
All three of these approaches are worthwhile, and there's no particular order in which they should be learned. It's all about what you want to get out of the experience. If it's simply about getting a job, find out exactly what they want. These are the 3 best places to start though, in my opinion.
The C Programming Langiage is hard if yiu are new. The questions at the end of the chapters are too hard for a newbie. The book is nice though in that it is short. There is not a single word wasted in that book.
You want C Programming: A Modern Approach by King. Whatever shitty C book they make you use, get this as a reference for clear information.
https://www.amazon.com/dp/0393979504/ref=cm_sw_r_cp_apa_glt_fabc_JTQFA4SS588RDBP1SYP4 Which if you look carefully on line can be found free in PDF form.
For assembly, the book Assembly for x86 Processors, by Kip Irvine.
https://www.amazon.com/dp/B08QMT625Y/ref=cm_sw_r_cp_apa_glt_fabc_2DPPCRV6RP6E4RJ6CAK5
Get yourself a good C book if you're interested: https://www.amazon.com/C-Programming-Modern-Approach-2nd/dp/0393979504
Best book if you're interested in learning the fundamentals in addition to some advanced topics.
Your post got caught in our spam filter because you use Amazon affiliate links. For the next time, please edit your Amazon links to look like this instead:
https://www.amazon.co.uk/dp/0393979504
https://www.amazon.co.uk/C-Programming-Language-2nd/dp/0131103628
I disagree with u/International-Fall36. Depending on what version of C you're using, it could be outdated (though, I do have the book as well). You're more likely to be learning modern C, so I'm recommending you this: https://www.amazon.com/dp/0393979504
I went through most of it during my C class (very in-depth, lots of exercises and problems, etc.). I can answer pretty much any question you have (so feel free to dm). No charge at all :)
I don't have OSCP and the following is probably overkill for it.
I am currently doing Harvard CS50x: Introduction to Computer Science which has been very enjoyable and the lectures are absolutely wonderful. The challenges are indeed challenging, but doable. The first half of this course mainly focuses on programming in C. If you have the time, I would encourage you to read "Head First C" and perhaps "C Programming: A Modern Approach 2nd Ed" in conjunction with the course. I am only halfway through the course and they certainly do not hold your hand in learning C.
​
I am also planning on taking their somewhat recently released course "CS50's Intro to Programming with Python" after completing CS50x. As I said, I'm sure this is all major overkill for OSCP, but I personally love CS50x so far, and I'm sure I will love the Python course as well.
https://www.amazon.com/C-Programming-Modern-Approach-2nd/dp/0393979504
I think this is one of the best books
One thing to think about is if you want to learn how to program or if you want to learn computer science because there is a big difference between the two. Take a look here.
For a very helpful, fun and fast overview of CS, go check out Crash Course Computer Science. I watched the entire series and it helped expose to many areas of CS and helped me better think about what my interests and career goals are. The videos are short, focused, digestible, and well-produced; you can squeeze one in each morning on the can. I genuinely regret not watching it sooner; it was advice I received early on.
Past those broad resources to help you get a higher level view of the field, I’d recommend just picking any language and learning it well from the ground up. I chose C and used this book. I have no regrets with this path now that I am taking Java and C++ courses; C++ evolved out of C and the Java creators chose to keep most of the C syntax when they designed the language (OOP syntax, aside).
As others have said, whatever you decide, just get started coding and code consistently; the rest can follow from there as you learn more about yourself and about the field.
1st function takes as argument an array and returns a pointer to an int
2nd function takes as argument a pointer to an array and returns an int
Not sure how far along you are but I think CS50 covers pointers at some point. I'm more a book person:
https://www.amazon.com/C-Programming-Modern-Approach-2nd/dp/0393979504
https://www.amazon.com/Programming-Language-2nd-Brian-Kernighan/dp/0131103628
Any of these will do fine. Or take a look at https://stackoverflow.com/questions/562303/the-definitive-c-book-guide-and-list for more expert views
I’ve seen this book getting recommended a lot:
https://www.amazon.com/C-Programming-Modern-Approach-2nd/dp/0393979504
If you want a textbook reference, this is the one they used in my course. Not sure if it's the same one they use in APS105 since I didn't take that course.
I’m also a newbie, so take this with a grain of salt as you await a more comprehensive reply!
What I’m currently doing is working through KN King’s C Programming: A Modern Approach and since I am on Windows, I have installed Visual Studio with the C/C++ compiler. I use Atom as my text editor, but there are a zillion to choose from.
If you’re on a different OS, you’ll do things differently as far as writing code compiling and executing it.
I think a good book on computer systems to go with your coding experience would also be super helpful; I’m currently using this in tandem with King, which is nice as it also does things in C. This is also really good.
Anyway, hope this helps and just remember to code a lot, ask a lot of questions, and have fun!
GeeksforGeeks is generally frowned upon. Harvard's CS50x on EdX is pretty good. The first four weeks are in C; then it switches to Python and JS. It's more project-based but sufficiently challenging to keep you busy. You can supplement or follow on with a good book like C Programming: A Modern Approach. The price is steep, but you can find a PDF of that with a good Google search.
I could be confused here.
K. N. King is the author of this book: https://www.amazon.com/C-Programming-Modern-Approach-2nd/dp/0393979504
I'm not sure, though, if that is the book OP is talking about.
Now that I think about it, it seems more likely OP is talking about this book: https://www.oreilly.com/library/view/modern-c/9781617295812/
There's this when Karen Reid taught it: https://www.amazon.ca/Programming-Modern-Approach-K-King/dp/0393979504
There's another popular one, known for the way they explain the concepts: https://www.amazon.ca/Programming-Language-2nd-Brian-Kernighan/dp/0131103628
Depending on your OS if you have windows consider downloading VMware and grabbing a linux image of your choice and you can start working with the terminal.
For debugging consider looking into tools like gdb instead of using print statements
Here's my current library of books. All of these I picked out based on great reviews on Amazon and/or recommendations from my Software Engineering coworkers (I work in the mobile game industry as a QA Lead).
Books I've finished and can give the stamp of approval for:
C Programming A Modern Approach - I used this book to "Self Teach" myself C as my first programming language. Probably not really applicable to you but I still think it's an amazing book: https://www.amazon.com/C-Programming-Modern-Approach-2nd/dp/0393979504
C# The Yellow Book - Great for learning C# from the ground up if you already know another programming language. My only gripe was it didn't have any exercises or assignments to go with it. Purely reading material: https://www.amazon.com/Programming-Yellow-Book-program-principles/dp/1728724961/ref=sr_1_2?s=books&ie=UTF8&qid=1546483167&sr=1-2&keywords=C%23+Yellow+book
Unity In Action 2nd Edition - You obviously got this one ordered already... Great choice! It won't really explain C# itself very well but it will explain Unity very well. You should probably finish an Intro to C# course or some C# specific book before jumping into this one if you know nothing about C#.
Books I bought but haven't gotten to yet if you're curious:
C# Player's Guide: https://www.amazon.com/C-Players-Guide-3rd/dp/0985580135/ref=sr_1_8?s=books&ie=UTF8&qid=1546484133&sr=1-8&keywords=C%23+books
The Clean Coder: https://www.amazon.com/Clean-Coder-Conduct-Professional-Programmers/dp/0137081073/ref=sr_1_1?s=books&ie=UTF8&qid=1546484584&sr=1-1&keywords=The+Clean+Coder
The Art of Game Design: A Book of Lenses: https://www.amazon.com/Art-Game-Design-Lenses-Second/dp/1466598646/ref=sr_1_3?s=books&ie=UTF8&qid=1546484608&sr=1-3&keywords=Game+Design
Great question. I think C code tends to be terse as C came to life when human-machine interaction was harder. Besides that, keep in mind that 'Clean Code' as coined by Robert C. Martin does not address imperative, functional, logical or even other paradigms with same attention or details. For a novice C programmer, I'd recommend C programming: a modern approach, pay special attention to headers files, functions prototypes, structs organization, variables scope and so on. Maybe it's indeed the case of code comments, especially structured code comments: docstrings, check https://github.com/MaJerle/c-code-style and https://www.cs.swarthmore.edu/~newhall/unixhelp/c_codestyle.html
If you're a beginner who wants to learn C, K. N. King's C Programming: A Modern Approach is the way.
I'd start here with the Aalto C Programming MOOC based on the K&R book.
Then take on Harvard's CS50, the best CS course anywhere. I'd use the C Programming: A Modern Approach book by King to accompany the course.
Finally to really learn C - you should read K&R's The C Programming Language (the bible for C) at some point and tackle every problem in the book!
Maybe this isn't the best thing to say, but I would say try to figure it out yourself. If you want to have a (good) career, a lot of your time will be spent figuring out things on your own and there won't be anyone to help you.
I would first off pick a better book. I personally think that Zed A. Shaw's books are a terrible way to learn programming. I would save the money you would pay a tutor and instead I would recommend picking up a copy of C Programming by K.N.King. Read the book and do all the exercises, then read it again. This will give you a great understanding of C.
For makefiles there are plenty of resources on the internet that you can find by googling. Or better yet, read the Make Manual.
I've read good things about this one:
https://www.amazon.com/C-Programming-Modern-Approach-2nd/dp/0393979504/
I've learned C mostly from this one:
https://www.amazon.com/Programming-Language-Brian-W-Kernighan/dp/0131103628/
I think both are good. I imagine the first one has more examples and exercises. Although I find it difficult that it'll be more interesting than the second one.
K&R or C Programming: A Modern Approach are both good.
LCTHW has a fair amount of controversy surrounding it. Zed's view.
I've not read it so no opinion, but with great sources like K&R or A Modern Approach, why risk your time.
Exact book name is C Programming, A Modern Approach. And get the second edition. (amazon link for reference)
I remember the first time I read K&R2 I didn't like chapter 1 because for a beginner programmer (as I was then) knowing only what chapter 1 teaches, some things become very difficult. Exercise 1-13 I think is a good example of that. It's possible to solve it with only what was taught so far in the chapter (however with considerable amount of "buts", "howevers" and restrictions -- the only way I now think of how to do it isn't something I'd find pretty or even would do), but what I have in mind is not something intuitive for a beginner. In the 80's and 90's, maybe the situation was different.
Exercise 1-14 isn't obvious, but you should be able to do it, I guess. I don't remember exactly what chapter 1 teaches up to that, but there is somewhat of a hint on how to do Exercise 1-14 in the "counting digits, white spaces and others" program (see how the ndigits array is used).
I also remember not having an issue with (actually rather liking a lot) chapters 2 and on.
If you're a beginner in the programming world, you can try another C book. You surely can go on and study from K&R2, but it some people find it difficult indeed. You can check other books in here (http://www.iso-9899.info/wiki/Books#Learning_C) like C Programming - A Modern Approach (http://www.amazon.com/C-Programming-Modern-Approach-2nd/dp/0393979504/).
Read "C Programming: A Modern Approach; 2nd Edition" by K.N. King.
Trust me on this one. It is made with the intention of being a textbook, but it is swell for self study. It has so many exercises and programming projects. They are not easy at all, so you really have to learn your stuff. I do all the exercises and programming projects just to make sure I have the concepts down.
The book is written in a way in which it is easy to read, yet still manages to communicate the tougher aspects of the language. I have obtained (hehe) other books such as "Programming in C" by Stephen G. Kochan and "C Primer Plus" by Stephen Prata, and have found them to also be good, but not quite as amazing as "C Programming: A Modern Approach".
Another often suggested book is "The C Programming Language" by Brian Kernighan and Dennis Ritchie; aka 'K&R'. This is the updated version of the first book on C, written by its developers. Many people swear by this book, but I find it dated.
Another resource I use is iTzAdam5X's "C Programming Tutorials" playlist. I admit that I have not watched many of his videos, but what I have seen has been acceptable. He doesn't seem to go into too much detail about concepts, but watching videos can bring another aspect of learning into the equation.
The main thing you need to do is enjoy the experience of programming. Try not to let your mind drift too far away off topic when learning, but if you find it is wandering go do something else for ~15mins and come back to it.
I wish you luck!
- Center60
I have to agree with above but I would recommend different books since they're a bit more beginner friedly.
Build a LISPy language with Ruby with the computation book http://computationbook.com/.
C Programming: A Modern Approach http://www.amazon.com/Programming-Modern-Approach-2nd-Edition/dp/0393979504
None really exist, it's better to get a good book and learn the language properly
http://www.amazon.com/Programming-Modern-Approach-2nd-Edition/dp/0393979504
http://www.amazon.com/C-Programming-Language-2nd/dp/0131103628
If you want to do it all on your own and have 0 experience you are going to have to learn a lot about programming and electronics.
You can start here for programming: http://www.amazon.com/C-Programming-Modern-Approach-2nd/dp/0393979504/ref=sr_1_1?ie=UTF8&qid=1426519326&sr=8-1&keywords=c+programming+a+modern+approach
For electronics start here:
Once you've done that then I suggest you start buying Arduino kits etc. I'm not saying you need a lot of experience to start with Arduino, but if you are looking to make a commercialized project and have a budget I think it's better to know what to buy before you start throwing money away in things (e.g. kits) you won't even use.
CS50x or UNSW Computing 1 are probably your best bet for decent C videos.
I've been attempting to learn C on my own for a few months, and I've tried (but not completed) many free courses/books, including the Carl Herold's series, and Learn C the Hard Way.
Honestly, none of them compared to sitting down with a great book for one afternoon and simply working through it. Compared to reading, videos are a passive experience, and (at least for me) you become more into the idea of programming rather than actually doing it and thinking about it for yourself.
Basically, these videos/courses are great if you want to use C as an initial step for learning programming. But if you want a deeper, more solid foundation with C specifically, it's gonna take some real work, time, (and possibly money for stuff like books).
Now, what is a "great" book? The one that was suggested to me was <em>C Programming: A Modern Approach</em> by K. N. King. It's very comprehensive, has loads of exercises/projects to work through, and it's written in such a way that it doesn't feel like a typical boring college textbook.
Sorry for the wall of text, but based on my personal experience, I really think it would be better in the long run to not use video tutorials as a primary learning source.
I have to say that I don't know. I know that some people like KNK, but as I haven't read it, I cannot vouch for it.
Both C Programming: A Modern Approach by King and C Primer Plus by Prata are fantastic resources. Browse through both of them and pick the one that appeals to you.
I am going to say start with C. C Programming: A Moden Approach. If you start with C I think once you master it, or understand it you will understand other languages better.
I am on this whole learn C, Data Structures, and Algorithms thing.