C Environment Setup

C Environment Setup

 installGCC(GNU Compiler Collection), visit official site (http://mingw.org/download/installer)and download after downloading we can install it in our system and compile or executeCand C++ program easily.

There are following some step to install GCC compiler in windows.

  • Download GCC (GNU Compiler Collection)compiler software.
  • Install it inside the system.
  • Opengcc command prompt and locate to the C source file location by using command. E.g. cd d:\c-program\Document> file-name.
  • To compileC program we can use gcc hello.c
  • We can execute compiled program by using EXE file (a.exe), at the time of compilation it will automatically create an a.exe file. We can execute that executable file in a different system at the same platform.

What is Compiler in C?

Compiler is a computer program that converts the human readable (programming language) source code into another computer language (binary code).

In other words, we can say that  compiler takes the code and convert in to the binary code that computer can understand easily.

List of C compilers for windows OS

There is various compiler of C & C++ language for windows that are given below:

  • CCS C Compiler
  • Turbo C
  • Minimalist GNU for Windows (MinGW)
  • Portable C Compiler
  • Clang C++
  • Digital Mars C++ Compiler
  • Intel C++
  • IBM C++
  • Visual C++ : Express Edition
  • Oracle C++

All of these above compilers for C are open source (free), but there are some other paid C compilers. We can get it for trial version:

  • Embarcadero C++
  • Edison Design Group C++
  • Green Hills C++
  • HP C++ for Unix
  • Intel C++ for Windows, Linux, and some embedded systems.
  • Microsoft C++
  • Paradigm C++

Note: In this tutorial, we used GCC Compiler andsome text editor like Notepad or Notepad++. We can also use other IDE or editor.

First C Program

Before starting C program, we have to follow som