views:

376

answers:

13

I want to learn C language (is this something good ?) and i didn't know from where i can download the language to my PC ? and are this FREE or must pay for ?

+21  A: 

Is C a good language? Definitely. Is it the best first language? Depends.

If you are using Windows, you can download Visual C++ 2008 Express Edition SP1 from Microsoft for free.

On Ubuntu, just run

sudo apt-get install build-essential

On Mac OS X, install Xcode from Snow Leopard/Leopard DVD (or download the latest version from Apple developer Web site)

Mehrdad Afshari
I want C not C++.
mavric
Visual C++ will also compile C.
ConcernedOfTunbridgeWells
sorry, but you mean that when i learn C (not c++) i can write my C programs on visual C++ ?i had visual C++ 2008 are this fair enough or must download the last version (sp1) ?a: thanks;goto a;
mavric
You can write C programs in all versions of Visual C++. SP1 is not required but it's the latest version out there.
Mehrdad Afshari
ok.what you prefer to learn first c or c++ or learn c++ and don't look to c ever ?
mavric
marvic: see: http://stackoverflow.com/questions/1085134
Mehrdad Afshari
+5  A: 

There are quite a few free C compilers for the PC.

As seen above, MS Visual Studio comes in a free version.

However, most introductory C programming materials will work best in a unix-like environment. Two options for such an environment are:

  • Cygwin, which provides a unix-like environment that can be installed over a windows system.

  • MinGW32/MSYS, which natively ports GCC and some unix-like development tooling onto Windows, allowing you to use GCC to build native Win32 apps.

For learning you might be better off running a native unix/linux environment. If you already have Windows and don't want to uninstall or dual-boot you can run this under a VM. Several free hypervisors are available that will let you do this.

ConcernedOfTunbridgeWells
There's no listing?
Mike McQuaid
MinGWW creates native Windows apps - it has nothing to do with "a UNIX environment". MSYS is a related port of some POSIX tools to windows (as native executables).
anon
MSYS gives you enough unix-like scaffolding to run the development tooling in a unix-like manner. That's what it was designed for.
ConcernedOfTunbridgeWells
+1  A: 

OK (all free):

For Windows - there is Visual C++ Express - MinGW (and is command-line based)

You will need the MS Platform SDK as well.

Linux/Sun - GCC (there are a number of ways to get this distro depending)

OS X - Apple's Developer Tools (Xcode and others)

The Platform SDK isn't needed from VC++ Express 2008+
Mike McQuaid
+2  A: 

If you want to use a different development environment you could try Eclipse.

Just go to this link and look for Eclipse IDE for C/C++ Developers (79 MB). http://www.eclipse.org/downloads/

James Black
+2  A: 

There is a free compiler called gcc that will compile C code. On Mac OS X and Linux you probably already have it, try typing gcc at a command prompt.

On Windows, you can still use gcc, but you need to use either Cygwin or Mingw.

Or if you want to use an IDE and Microsoft's C compiler you can get a free version of Visual Studio here.

samoz
A: 

This is a an excellent reference of free compilers for many systems.

http://www.thefreecountry.com/compilers/cpp.shtml

Juan
A: 

Intel provides free non-commercial compilers for Linux. The download includes the excellent Intel debugger & profiler. The free license can be summed up in two points:

  1. My use of software products is for personal non-commercial purposes.

  2. I understand that technical support will be provided by community self-help and user forums (via the Software Support link above), but cannot get committed support with a non-commercial license.

For the projects I work on, I personally prefer Intel Compilers over GNU... Intel seems to do a better job of optimization.

Pete
+2  A: 

You can use Dev C++ . Very decent tool for beginners and intermediates.

desigeek
Ah, Dev C++, that brings me back. I liked not having to make a bloody project just to compile the code. :)
Agor
anon
As a lady developer, I have used Dev C++ and loved it - particularly because the included gcc compiler could compile a platform-independent executable. Although not actively developed, it's much better than using Microsoft compilers.
Helen Neely
A: 

On Windows, I'll suggest Dev CPP. This is free an a very good product. It is also easier for the newbies to learn. I used it a lot. You can download the latest from http://www.bloodshed.net/devcpp.html

If in Linux, there should be gcc. Use any editor of your choice( In my case vim). Just type vim filename.c in the terminal. This should bring the editor. press 'i' and write in the code. then press 'Esc' followed by ':' and x (This will save the file and exit the editor. Now type gcc filename.c at the terminal. this should compile it. Now enter ./a.out to execute it.

Christy John
+1  A: 

It is definitely free to learn and program C, but the answer to your first question "is this something good ?" depends on what your goals are. C is a very good language for some things, but not everything.

System programming is almost always done in C, along with network programs and some applications. C is also the basis for most modern programming languages you will work with, so learning the C syntax can be applied as you go about learning other things. However, if you are looking to make a interactive webpage, you might want to learn PHP. If you are looking to make a desktop application with a GUI, you might want to learn Java.

If you want to just get a start learning about programming, C can help you with that. If that's what you want to do, and dont care much about application right now, I suggest you go to the bookstore and just find a book on learning C for beginners. It should have a CD in the back with a compiler (probably visual studio), and should get you on your way.

Doldrim
A: 

If you wanted a "portable" compiler, Tiny C Compiler is a decent compiler that you can take with you on a USB stick - it's only a single .exe file or a single folder IIRC. It is cross platform as well, but the biggest downsides are that the warnings are lacking and that it's optimization isn't as good as the bigger compilers out there.

Nonetheless, it's a decent compiler to "play around with" if you don't want to install Visual Studio or Cygwin on Windows.

Mark Rushakoff
A: 

I think you need to be clear about the distinction between C and C++ before you decide what to do.

A: 

On Windows, try either Digital Mars C and C++ compilers or Open Watcom C and C++ products

dmityugov