Ads

Showing posts with label language. Show all posts
Showing posts with label language. Show all posts

Difference between Translator and Compiler

  • Well compiler is a specific type of translator, which translates the high level code to machine understandable code.
  • Whereas Translator is a program which coverts code of particular programming language to functionally equivalent code of other programming language.
S.No Translator type Its called
1. Which translate from one high level language to another high level language Source to source compiler
2. From high level language to lower level language Compiler
3. From assembly to machine level language Assembler
4. From machine to assembly Disassembler
5. Machine code to source decompiler


What is an ANSI standard?


  • Each and every language needs a compiler to compile (or else we can say decoder) it to machine understandable language (binary executable code).
  • Let us assume a group of people started working to create a compiler for C and a other group of people somewhere else in the world started developing a compiler for C then depending on their requirement both of them may create some different kind of function prototypes, then code created for one compiler may not run (or compile) on the other compiler.
  • To diminish such type of errors, in 1983 ANSI- American Nationals Standard has started defining a standard for C. The standard was approved in 1989 and adopted by ISO in 1990 and it was called as C89.
     

“The standard specifies the syntax and semantics of programs written in the C programming Language”
 
  • The C before the standardization was known as K&RC.
  • From then standard is being updated and are published. Thus we can say that C language has grown compared to the language at the time of its birth.
  • Anyone can access C standards from ANSI or ISO website’s web-store by mentioning the name of the standard at a particular cost. Older versions may not be available.
Standard Official Name
C89 ANSI/ISO 9989:1990
C99 ISO/IEC 9899:1999
C11 ISO/IEC 9899:2011
  • After a standard is published a technical corrigenda is published to rectify errors in the standard (if any).

COMPILER AND EDITOR

    As C is a programming language, practicing the programs while learning is a very good habit, which turns out into efficient learning. Thus before entering into course let’s take a quick guide on famous editors and compilers available to create, edit and decode C program.

EDITOR:
COMPILER:
  • A compiler is a program that reads a program written in one language (called the source language) and translates it into an equivalent program in machine level language
  • The compiler also reports to its user the presence of errors in the source program so that user can re-edit the source program and compile it once again.

  • Some examples of C compilers are GCC, Clang, Intel C. Famous and most widely used Compiler is GCC . And we also have Turbo C, Borland C IDE’s with inbuilt compiler.
       Okay !!! Now as we came to know about editor and compiler, let’s go further into the topic. There are software’s called IDE available in market.
But what is an IDE?
For more compiler’s check out this article from about.com , and from Wikipedia.com.