0% found this document useful (0 votes)
7 views3 pages

Introduction to Programming Languages

jntu k r23 IP

Uploaded by

Vali Bhasha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views3 pages

Introduction to Programming Languages

jntu k r23 IP

Uploaded by

Vali Bhasha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Introduction to Programming Languages:

A programming language is a set of symbols, grammars and rules with the help of which one is
able to translate algorithms to programs that will be executed by the computer. The programmer
communicates with a machine using programming languages. Most of the programs have a highly
structured set of rules.

Hierarchy of Programming/Computer languages:


1. High level Language s

2. Middle level Languages / Assembly level


Languages

3. Low level Languages / Binary level Languages / Machine level Languages

Characteristics of a programming Language:

 A programming language must be simple, easy to learn and use, have


good readability and human recognizable.
 Abstraction is a must-have Characteristics for a programming language in
which ability to define the complex structure and then its degree of
usability comes.
 A portable programming language is always preferred.
 Programming language’s efficiency must be high so that it can be easily
converted into a machine code and executed consumes little space in
memory.
 A programming language should be well structured and documented so that
it is suitable for application development.
 Necessary tools for development, debugging, testing, maintenance
of a program must be provided by a programming language.
 A programming language should provide single environment
known as Integrated Development Environment (IDE).
 A programming language must be consistent in terms of syntax and semantics.

Compiler:
A compiler is a special program that processes statements written in a
particular programming language and turns them into machine language or
"code" that a computer's processor uses. Typically, a programmer writes
language statements in a language such as Pascal or C one line at a time
using an editor.
The file that is created contains what are called the source statements. The
programmer then runs the appropriate language compiler, specifying the name of
the file that contains the source statements.
When executing (running), the compiler first parses (or analyzes) all of the
language statements syntactically one after the other and then, in one or more
successive stages or "passes", builds the output code, making sure that statements
that refer to other statements are referred to correctly in the final code.

o A compiler is a translator that converts the high-level language into


the machine language.
o High-level language is written by a developer and machine language can
be understood by the processor.
o Compiler is used to show errors to the programmer.
o The main purpose of compiler is to change the code written in one
language without changing the meaning of the program.
o In the first part, the source program compiled and translated into the
object program (low level language).
o In the second part, object program translated into the target program
through the assembler.

Interpreter:

In computer science, an interpreter is a computer program that directly executes


instructions written in a programming or scripting language, without requiring
them previously to have been compiled into a machine language program.

An interpreter which coverts each high-level program statement into the machine
code. This includes source code, pre-compiled code, and scripts. Both
compiler and interpreters do the same job which is converting higher level
programming language to machine code. However, a compiler will convert the
code into machine code (create an exe) before program run. Interpreters convert
code into machine code when the program is run.

Differences between Interpreter and Compiler:


S. No Interpreter Compiler

1 Translates program one statement at a time. Scans the entire program and translates it
as a whole into machine code.

Interpreters usually take less amount Compilers usually take a large


of time To analyze the source code. amount of time To analyze the
However, the overall execution time is source code.
2 comparatively slower than compilers. However, the overall execution time is
comparatively faster than interpreters.

No intermediate object code is generated, Generates intermediate object code which


hence are memory efficient. further requires linking, hence requires
3 more memory.

4 Programming languages like JavaScript, Programming languages like C, C++, Java


Python, Ruby use interpreters. use compilers.

You might also like