Why use C and preparing environment for using C

In our previous post we discussed about the history of C and today we have a glance about the usage of C in daily life and environment setup for implementing the code.

  • C was initially used for system development work, particularly the programs that make up the OS.
  • C produces code that runs nearly as fast as the code written in assembly language.
  • Here are some of the examples where C can be used –
    • OS
    • Language Compilers
    • Assemblers
    • Text Editors
    • Print Spoolers
    • Network Drivers
    • Modern programs
    • Databases
    • Language Interpreters
    • Utilities

Now, we see about the environment setup for C language:

  • If you want to set up your environment locally, you need the following two software tools.
    • Text Editor (Windows Notepad)
    • The C Compiler (GNU C/C++ Compiler)
  • Here, we do not use turbo C compiler as so many schools and colleges are using. Here we go in a bit professional manner.
  • It will be very easy to install the compiler.
  • To install GCC on Windows, you need to install MinGW. To install MinGW, go to the MinGW homepage www.mingw.org and go to the MinGW download page.
  • Download the latest version of MinGW installation program, which should be named MinGW-<version>.exe.
  • While installing MinGW, at a minimum, you must install gcc-core, gcc-g++, binutils and the MinGW runtime, but you may install more as per your requirement.
  • Add the bin sub directory of  your MinGW installation to your PATH environment variable, so that you can specify these tools on the command line by their simple names.
  • After the installation, you will be able to run gcc, g++, ar, ranlib, dlltool, and several other GNU tools from the Windows command line.

In our next post in C Programming, we will discuss about writing the code and implementing it in our local system.

Leave a comment