c langauge overview

C language overview:
The C programming language is a general-purpose, high-level language that was originally developed by Dennis M. Ritchie to develop the UNIX operating system at Bell Labs. C was originally first implemented on the DEC PDP-11 computer in 1972. In 1978, Brian Kernighan and Dennis Ritchie produced the first publicly available description of C, now known as the K&R standard. The UNIX operating system, the C compiler, and essentially all UNIX applications programs have been written in C. The C has now become a widely used professional language for various reasons.

  1. Easy to learn  
  2. Structured language
  3. It produces efficient programs.
  4. It can handle low-level activities.  
  5. It can be compiled on a variety of computer platforms.

Facts about C:
  1. C was invented to write an operating system called UNIX.  
  2. C is a successor of B language, which was introduced around 1970.
  3. The language was formalized in 1988 by the American National Standard Institute. (ANSI).  
  4. The UNIX OS was totally written in C by 1973.
  5. Today, C is the most widely used and popular System Programming Language.
  6. Most of the state-of-the-art softwares have been implemented using C.
  7. Today's most ][popular Linux OS and RBDMS MySQL have been written in C.

Why to use C?
  1. the portability of the compiler;
  2. the standard library concept;
  3. a powerful and varied repertoire of operators;
  4. an elegant syntax;
  5. ready access to the hardware when needed;
  6. and the ease with which applications can be optimised by hand-coding isolated procedures


Programs C can vary from 3 lines to millions of lines and it should be written into one or more text files with extension ".c"; for example, hello.c. You can use "vi", "vim" or any other text editor to write your C program into a file.

C Environment setup:
Before you start doing programming using C programming language, you need the following two softwares available on your computer, (a) Text Editor and (b) The C Compiler.

Text Editor :
This will be used to type your program. Examples of few editors include Windows Notepad, OS Edit command, Brief, Epsilon, EMACS, and vim or vi. Name and version of text editor can vary on different operating systems. For example, Notepad will be used on Windows, and vim or vi can be used on windows as well as Linux or UNIX. The files you create with your editor are called source files and contain program source code. The source files for C programs are typically named with the extension “.c”. Before starting your programming, make sure you have one text editor in place and you have enough experience to write a computer program, save it in a file, compile it and finally execute it. The C.
C compiler:
The source code written in source file is the human readable source for your program. It needs to be "compiled", to turn into machine language so that your CPU can actually execute the program as per instructions given. This C programming language compiler will be used to compile your source code into final executable program. I assume you have basic knowledge about a programming language compiler. Most frequently used and free available compiler is GNU C/C++ compiler, otherwise you can have compilers either from HP or Solaris if you have respective Operating Systems. Following section guides you on how to install GNU C/C++ compiler on various OS. I'm mentioning C/C++ together because GNU gcc compiler works for both C and C++ programming languages.

List of C/C++ compilers for UNIX/LINUX operating system:

      There are so many compilers available in market for UNIX/LINUX operating system. We are listing some of them here for your reference.
1. AMPC
2. CCs C compiler
3. ch, clang
4. GCC C compiler
5. Interactive C compiler
6. Mikro C compiler
7. Portable C compiler
8. Small C and XL C Compilers etc

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 something as follows:

Using built-in specs.
Target: i386-redhat-linux
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 will have to install it yourself using the detailed instructions available at http://gcc.gnu.org/install/

Installation on Windows
1.download Turboc++,
2.To install GCC at Windows you need to install MinGW


Comments

Popular posts from this blog

C Program to Display the ATM Transaction

Java programming language

Python Program to Print all Prime Numbers in an Interval