C Installation and Environment setup

In this tutorial you will learn  how to install and set up an environment for C programming in various operating systems by yourself.

Try It Option Online

Nowadays, compiling C online has been a trend among programmers for short projects.  It comes with many benefits which are as follows:

  1. Newer versions of C compilers used to be published regularly, so the latest offline compiler of today becomes obsolete tomorrow. Here online compilers come handy and you have to never worry about the version of the software.
  2. Downloading and installing software requires a fair amount of space and speed and it becomes a factor especially in case of machines with lower configuration. Online compilers help you get rid of these problems.

C programming

Writing of a C program is accomplished in two simple steps of coding and compiling. You can do the coding in different text editors like notepad in Windows OS, TextEdit in Mac OS and gedit in Linux OS. Then the compiler OS runs which reads the codes line by line and searches for errors. If any error or abnormalities are found they are flagged as 'error' and 'warning'. After the debugging is done and the compiler finds the code to be error-free, it produces an executable file with an extension of '.exe'. following diagram shows the overall process of C programming.

In most Mac and Linux environments, free C compilers are available which work in command prompt or terminal window. To run these compilers generally some specified commands or arguments containing 'cc' or 'gcc' are used. In the case of Windows, you may opt for a graphical user interface using IDE(Integrated Development Environment). Most popular IDEs are Microsoft Visual C and C++, Eclipse (Java-based) etc.

Local Environment Setup

To create and execute programs locally you need two important things in your system. They are:

  • Text Editor
  • Compiler

Text Editor: Text editors are used to writing programming codes as simple texts. Text editors l fed the compiler with codes only which can be easily understood and executed by the compiler. Another great feature of a text editor is syntax highlighting. In text editors different groups of keywords of C come in different colors, even if it reminds you if you have missed the opening or closing braces during coding. Most of the text editors are versatile in nature, and they determine the programming language by detecting its extension name. Quick navigation is another great feature of them which allows you to jump to a specific line of a program by just entering a command and line no.

The C compiler: There are different types of C compilers in the market, but Turbo C++ is best for the beginners. It is a successor of Turbo C compiler from Borland which was first introduced in 1987. It can run in MS-DOS and Windows as well and the first C++ version was released in 1990 which gained immense popularity worldwide.

Why IDE?

An Integrated Development Environment allows you to build,compile and run your program from a single platform. The latest and popular cross-platform IDE  is Code ::Block. it supports Mac, Windows  and Linux operating systems. Here you can see how to download and  install Code::Block in Windows 10, Linux and Mac.

How to download IDE -CodeBlock to your system

Code :: block  is the most recent and popular used IDE in Windows OS. The steps to install this IDE are as follows:

  1. Download the IDE by visiting their official website through www.codeblocks.org
    building blocks of object oriented programming
  2. You have reached the official home  page of codeblocks.org where you can find the download tab which you need to click.On clicking the download tab you will be taken to the download page where many options are awaiting you. Just click on the Download the binary release that comes first in the page.
    building blocks of object oriented programming
  3. Click on the Download the binary release will move you to another page where you can find the multiple options for downloading the proper version for your OS.
    building blocks of object oriented programming
    1. Windows Version
      building blocks of object oriented programming
    2. Linux Version
      building blocks of object oriented programming
    3. Mac Version
      building blocks of object oriented programming
  4. On clicking sourceforge.net ,downloading automatically happens and you can see a  window as shown below while downloading.
    building blocks of object oriented programming
  5. When download is completed you will get the notification in download as shown as below.You can right click on the arrow and show in the folder which will take you to the download folder in your system
    building blocks of object oriented programming