Good place to start learning C?
Moderator: Moderators
-
Termingamer2-JD
- Posts: 14
- Joined: Sun Sep 20, 2015 5:44 am
Good place to start learning C?
Where's a good place?
I don't always trust search engines because their results are done via SEO, not by user feedback, where could you recommend is a good place to get a C programming tutorial in full on the web?
If it's a downloadable file (PDF, DOC, etc) it's allowed. I'm using XP SP3 if it means anything, so it needs to work on there.
Thanks,
Termingamer
I don't always trust search engines because their results are done via SEO, not by user feedback, where could you recommend is a good place to get a C programming tutorial in full on the web?
If it's a downloadable file (PDF, DOC, etc) it's allowed. I'm using XP SP3 if it means anything, so it needs to work on there.
Thanks,
Termingamer
Re: Good place to start learning C?
https://en.wikipedia.org/wiki/The_C_Pro ... g_Language
If you add the term PDF to the book title in a seach engine, you should have no trouble finding a copy of it.
If you add the term PDF to the book title in a seach engine, you should have no trouble finding a copy of it.
- rainwarrior
- Posts: 8062
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: Good place to start learning C?
I learned from this book a very long time ago: http://www.free-engineering-books.com/2 ... using.html
I don't really remember if it was a good or bad book, but it was certainly enough to get me started. Once you get the basic ideas down, the real way to learn is to write programs, and especially: read programs written by others.
I don't really remember if it was a good or bad book, but it was certainly enough to get me started. Once you get the basic ideas down, the real way to learn is to write programs, and especially: read programs written by others.
Re: Good place to start learning C?
Better yet, modify someone else's program. Change something.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
-
Termingamer2-JD
- Posts: 14
- Joined: Sun Sep 20, 2015 5:44 am
Re: Good place to start learning C?
I need to be able to code stuff to change something though...
And yeah, I'll go and look into those later. At the moment I don't have much time.
Thanks.
And yeah, I'll go and look into those later. At the moment I don't have much time.
Thanks.
Re: Good place to start learning C?
Not really great advice, the book is extremely old and sometime shows things that turned out to be bad practice in the language. I'd say by all means use the book, but not only that book, use it as one among other resources to learn C.Memblers wrote:https://en.wikipedia.org/wiki/The_C_Pro ... g_Language
If you add the term PDF to the book title in a seach engine, you should have no trouble finding a copy of it.
Horrible advice. If you cannot write your own hello world program from the ground up, you'll never be getting anywhere, seriously.Better yet, modify someone else's program. Change something.
As for my own advice, well I'd use books, there is literally thousands for learning C. You could also use websites, if you prefer. I think the advantage of paper books is that you can read them and do some exercises without using a computer, and that's kind of nice, since you'll already have to sit hours in front of your PC to try to code something and debug your code.
Re: Good place to start learning C?
C is nothing without a compiler.
Re: Good place to start learning C?
Why is it that the compiler seems to be the ugliest part of any programming language?
-
Termingamer2-JD
- Posts: 14
- Joined: Sun Sep 20, 2015 5:44 am
Re: Good place to start learning C?
It's not just the Hello World program that counts, it's whether you understand it or not, I think.
Of course, I haven't a position to say that but really, just copy/pasting isn't coding, learning is doing your own mods to the stuff and write the code.
Also, I have a couple of questions about the development of the emulator in my 'first things to do for an nes emulator' thread, regarding what to use C for in there...
I'd need to use assembly in places, for TerminNES.
Of course, I haven't a position to say that but really, just copy/pasting isn't coding, learning is doing your own mods to the stuff and write the code.
Also, I have a couple of questions about the development of the emulator in my 'first things to do for an nes emulator' thread, regarding what to use C for in there...
I'd need to use assembly in places, for TerminNES.
Re: Good place to start learning C?
What I've learned through a couple computer science courses is that pretty much every high level language is the same. If statements, if-else statements, for loops, while loops, switch statements, primitive data types, condition testing, etc. It's all pretty much exactly the same. So if you know how to make a "Hello World" program in c, you should pretty much know how to do it in Java, C++, C#, Python, etc.Termingamer2-JD wrote:It's not just the Hello World program that counts, it's whether you understand it or not, I think.
Of course, I haven't a position to say that but really, just copy/pasting isn't coding, learning is doing your own mods to the stuff and write the code.
Also, I have a couple of questions about the development of the emulator in my 'first things to do for an nes emulator' thread, regarding what to use C for in there...
I'd need to use assembly in places, for TerminNES.
Re: Good place to start learning C?
It's not pretty much every high level language which is the same, it's pretty much every imperative languages. Some high-level non-imperative languages are indeed very different.What I've learned through a couple computer science courses is that pretty much every high level language is the same. If statements, if-else statements, for loops, while loops, switch statements, primitive data types, condition testing, etc. It's all pretty much exactly the same. So if you know how to make a "Hello World" program in c, you should pretty much know how to do it in Java, C++, C#, Python, etc.
Also, the point of an hello world is not to use if or while statements (they are notmally not found in a "hello world" type program) but just to have some basic syntax ready for a program.
-
Termingamer2-JD
- Posts: 14
- Joined: Sun Sep 20, 2015 5:44 am
Re: Good place to start learning C?
Ah. I see the point now you explained it, I just saw it as a simple test thing, thanks.
Probably tonight I'll be studying C using what has been linked to in NESdev
Probably tonight I'll be studying C using what has been linked to in NESdev
Re: Good place to start learning C?
I figured it was a given that languages of different paradigms are different. But yes, something like Lisp is very different from somehing like C.Bregalad wrote:It's not pretty much every high level language which is the same, it's pretty much every imperative languages. Some high-level non-imperative languages are indeed very different.What I've learned through a couple computer science courses is that pretty much every high level language is the same. If statements, if-else statements, for loops, while loops, switch statements, primitive data types, condition testing, etc. It's all pretty much exactly the same. So if you know how to make a "Hello World" program in c, you should pretty much know how to do it in Java, C++, C#, Python, etc.
- mikejmoffitt
- Posts: 1352
- Joined: Sun May 27, 2012 8:43 pm
Re: Good place to start learning C?
K&R's "The C Programming Language" as Memblers recommended is a great place to learn C from.
I'm in support of DWEdit's advice to modify another program for the sake of experimentation, but you should hold off on that until you're familiar with the basics.
As for getting an environment together, you can screw around with MinGW or Cygwin to get it working on Windows, or install just about any Linux distro.
I'm in support of DWEdit's advice to modify another program for the sake of experimentation, but you should hold off on that until you're familiar with the basics.
As for getting an environment together, you can screw around with MinGW or Cygwin to get it working on Windows, or install just about any Linux distro.
- rainwarrior
- Posts: 8062
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: Good place to start learning C?
And environment for what? What does Linux have to do with this thread?mikejmoffitt wrote:As for getting an environment together, you can screw around with MinGW or Cygwin to get it working on Windows, or install just about any Linux distro.
Like, sure Linux usually comes with a C compiler, but there are like 100 different flavours of C for Windows that don't involve emulating Linux. (I've got nothing against MinGW btw; it's a decent compiler. Just kinda confused by the idea that installing Linux or Cygwin is a better idea than just installing a C compiler?)