To start programming in C, you must have a compiler installed in your system.
A compiler is a computer program or a software which converts source code written in a programming language to the machine language code. In general, a compiler converts your code into a form that your computer can understand.
There are different C compilers available for different operating systems. You can choose any of them. Now a days, many standard compilers comes as a single package that would work for both C and C++.
Some of the most common compilers are –
- Turbo C
- Minimalist GNU for windows (MinGW)
- Portable C compiler
- IBM C++
- Intel C++
- Clang C++
- Visual C++ : Express Edition
- Oracle C++
All of the above compilers are open source (freely available on the internet), how ever some compilers are paid. Some of them are –
- Embarcadero C++
- Green Hills C++
- Paradigm C++
- Microsoft C++
- HP C++ for Unix
Installation on UNIX/Linux –
If you are using Linux or UNIX, then check whether GCC is installed on your system by entering the following command from the command line −
$ gcc -v
If you have GNU compiler installed on your machine, then it should print a message as follows −
Using built-in specs.
Configured with: ../configure –prefix=/usr …….
Thread model: posix
gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)
If GCC is not installed then you need to install it from https://gcc.org/install
Installation on Mac OS
For Mac OS, the easiest way to obtain GCC is to download the Xcode development environment from apple’s official website. After that you will be able to use GNU compiler for C/C++.
The link is developer.apple.com/technologies/tools
Installation on Windows OS –
To install GCC on windows operating system, first you need to install MinGW. To install it, you can visit www.mingw.org.
Download the latest version of the MinGW from there.
Note : There are a number of online compilers available which can be used anytime without anything to be downloaded or installed. For example https://www.onlinegdb.com/online_c_compiler or https://www.tutorialspoint.com/compile_c_online.php