I was just wondering if someone can give me a link where i can download ANSI C compilers,or maybe someone can tell me specificly which one,for the books named "The C programming language" by Brian W.Kernighan and Dennis M.Ritchie?
I was just wondering if someone can give me a link where i can download ANSI C compilers,or maybe someone can tell me specificly which one,for the books named "The C programming language" by Brian W.Kernighan and Dennis M.Ritchie?
It's actually ISO standard (the standards were developed by ANSI, and later ratified by ISO). Being an ISO standard carries more weight in some parts of the world than being an ANSI standard.
Depending on age of your edition of the book by Kernighan and Ritchie (those guys have been around for a while) it may be older than any of the C standards. The ISO C standards date from 1990 (or 1989 for the ANSI equivalent) and 1999, and the age of the book will give you an indication of what standard - if any - it is concerned with.
If you want a compiler for windows, look at Pelles C or at mingw. If you want a compiler for a range of systems (including windows and unix variants) look for the Gnu compiler collection (mingw is a port of gcc for windows). There are others around.
its a second edition.Any suggestions for the compiler i should get for that one?
Last edited by Filster; 07-28-2011 at 05:20 AM.
Then it predates both C standards (being from 1988), but probably covers some features from the 1990 ISO standard (as Kernighan and Ritchie were in the loop when that standard was written).
You would be better off updating your book and getting a modern compiler. Several features of K&R C were either eliminated from the C standard, or deprecated (flagged as obsolete, and scheduled for removal from the standard).
So what compiler should i download then,or was it a waste that i got that book?
Gnu compilers will probably support pre-standard, K&R versions of C. But you will need to look up command line options to get that to work (it won't be enabled by default). I don't know if Pelles C supports K&R C (never had a reason to look).
If you buy a book about a programming language that is over 20 years old, you can expect some aspects to be outdated. Even with books by K&R that are actually pretty good.
Too be honest,im just a begginer ,just wanted too know what compiler should i download,i realy dont know anything about options or anything..
So i should download a GNU?
As I said, you would be better off with a reasonable quality modern compiler, and accept that the compiler may reject some code from an old text book. Pelles C or gnu (mingw if you are using windows) will be fine.
If you go through the list linked to by fronty, there will be alternatives. There are no absolutes in terms of the one and only one compiler you should use though. No matter what compiler you pick, there will be a learning curve - compilers are tools that require expertise to use properly, so they take a while to learn.
Sorry too bother grumpy ,but can you type a link for those compilers download,btw i am using windows.
I gave links in my first post in this thread.
A great deal of the code and examples given in K&R's book, second edition, is still OK, today. It's a great book, keep it.
Yes, there have been changes - there always are, but they don't generally have a big impact on people learning C. The changes that do impact you, you just adapt to, and it's no big deal imo.
I recommend either Pelles C, or Microsoft Visual Express. Both are free, and offer a good product. Pelles C isn't as well known, but both offer easy access to people who really know the compiler and C. That's important, because you will have specific questions about the user interface, as well as C.
I have no experience with GNU's compilers.
Have a look here
Free C / C++ Compilers and Interpreters (thefreecountry.com)