SlideShare ist ein Scribd-Unternehmen logo
1 von 24
C Programming
Jigar Jobanputra
Cont..
• C is a general-purpose structured
programming language that is powerful,
efficient and compact.
• C combines the features of high-level
language with elements of the assembler and
thus, the close to both man and machine
(computer).
• C was developed and implemented at Bell
Laboratories in 1972 by Dennis Richie.
Cont..
• Important of C or features of C.
• It is a robust language whose rich set of built-in function and
operators can be used to write any complex program.
• The C compiler combines the capabilities of an assembly
language with the features of a high-level language and
therefore it was suited for writing both system software and
business packages. In fact, many of compilers available in
market are written in C.
• Program written in C are efficient and fast, this is due to
variety of data types and powerful operators.
• There are only 32 keywords and its strength lies in its in-built
functions. Several standard functions are available which can
be used for developing programs.
• C is highly portable, its means that C programs written for one
computer can be run on another with little or no modification.
Cont..
• C language is well suited structured programming,
thus required the user to think of a program in
terms of function modules or blocks. Proper
collections of these modules make a complete
program. This modular structure makes program
debugging, testing and maintenance easier.
• C is its ability to extend itself. A c program is
basically collection of functions that are supported
by the C library. We can continuously add our own
function to the c library. Thus with availability of
large number of functions, the programming task
becomes simple.
Cont..
• C Instructions:
• Type declaration instructions: used to declare types of variables
used in programs. E.g. int a;
• Input/output instructions: used to input data required by program
and information to be output on printer/screen. E.g. printf and scanf.
• Arithmetic Instructions: arithmetic instruction done between
constants and variables. Eg. Assignment statement.
• Control instructions: To maintain order of execution of different
statements control instruction are used. They are following types:
• Unconditional control statement e.g Goto statement.
• Decision control statement e.g. IF statement.
• Loop control statement e.g For and do statement.
• Case control statement .e.g Case statement.
Cont..
• Basic structure of C programs:
• 1. Documentation section: consists of a set of comments
lines giving the name of program, author and other detail
which programmer would like to use later.
• 2. Link section: this section provides instruction to compiler
to link function from system library.
• 3. Definition Section: this section defines all symbolic
constants.
• 4. Global Declaration section: there are some variables that
are used in more than one function. Such variables are called
global variables and are declared in global definition section
that is out side of all the functions.
Cont..
• 5. Main( ) function section: every c program must
have one main( ) function section and its divided in to
two part one is declaration part and executable part.
The declaration part declares all the variables used in
executable part. There is at least one statement in
executable part. And these two parts appear between
opening and closing braces ( { } ). All the statements in
the declaration and executable parts end with a
semicolon ( ; ).
• 6. Subprogram section: this section contains all the
user-defined functions that are called in the main
section. User-defined functions are generally placed
immediately after the main function, although they may
appear in any order.
C Program Characteristics
• Reliability: i.e the program can be depended upon always to
do what is supposed to do.
• Integrity: This refers to accuracy of the calculations. It should
be clear that all the other program enhancements would be
meaningless if the calculations were not carried out correctly.
• Clarity or Readability: It refers to the overall readability of
the program, with particular emphasis on its underlying logic.
If the program is written clearly, it should be possible for
another programmer to follow the logic without undue effort.
• Maintainability: i.e. the program will be easy to change or
modify when the need arises.
• Portability: i.e. the program will be transferable to different
computer with a minimum of modification.
Cont..
• Performance or Efficiency: i.e. the program causes the
tasks to be done quickly and efficiently. It also concerned with
execution speed and efficient memory utilization this aid
reliability, maintainability and portability.
• Storage saving: i.e. the program is not allowed to be
unnecessarily long.
• Modularity: Many programs can be decomposed into series
of identifiable sub tasks. It is good programming practices to
implement each of these subtasks as a separate module. (In
Pascal, such module refers as procedures and functions). The
use a modular programming structure enhances the accuracy
and clarity of a program, and it facilities future for program
alterations.
VARIABLES
• A variable is a named data storage
location in your computer’s memory.
• By using a variable’s name in your
program, you are, in effect, referring to the
data stored there.
VARIABLE NAMING
CONVENTION
• To use variables in your C programs, you must know
ho to create variable names in
• C,variables names must adhere to the following rules:
– The name can contain letters, digits, and the underscore
character(_).
– The first character of the name must be a letter. The
underscore is also a legal first character, but its use is not
recommended.
– Case matters (that is uppercase and lowercase letters).
Thus, the names count and Count refer to two different
variables.
– C keywords can’t be used as variable names. A keyword is
a word that is part of the C language.
Different Programming Language
• There are three different level of
programming languages. They are
• (1) Machine languages (low level)
• (2) Assembly languages
• (3) Procedure Oriented languages (high
level)
• (4) Fourth Generation languages (4 GLS)
Cont…
• (1) Machine Languages :-
• Computers are made of No. of electronic
components and they all are two – state
electronic components means they
understand only the 0 – (pulse) and 1 (non
– pulse).
• Therefore the instruction given to the
computer must be written using binary
numbers. 1and 0.
• Computers do not understand English or
Cont…
• (2) Assembly Languages :-
• As it was very tedious to understand and
remember 0’s representing numerous data
and instruction.
• So to resolve this problem mnemonics
codes were developed. For example add
isused as symbolic code to represent
addition. SUB is used for subtraction.
• They are the symbolic representation of
certain combination of binary numbers
Cont..
• Which represents certain actions as
computer understand only Machine
language instructions a program written in
Assembly Language must be translated
into Machine languages.
• Before it can be executed this translation if
done by another program called
assembler. This assembler will translate
mnemonic codes into Machine languages.
Cont…
• (3) Procedure Oriented Languages
• In earlier assembly languages assembler
programs produced only one Machine
languages instruction for every assembly
languages instruction.
• So to resolve this problem now assembler
were introduced. Which can produce
several machine level instructions for one
assembly language instruction.
• Thus programmer was relieve from the
Cont..
• These languages are also called high level
languages. Basic, Fortran, Pascal and
COBOL.
• The most important characteristic of high
level languages is that it is machine
independent and a program written in high
level languages can be run on any
computers with different architecture with
no modification or very little modification.
WHAT IS LANGUAGE
TRANSLATORS?
• As we know that computer understand
only the instruction written in the Machine
language. Therefore a program written in
any other language should be translated to
Machine language. For this purpose
special programs are available they are
called translators or language
processors. This special programs accept
the user program and check each
statement and produces a corresponding
Compiler
• A Compiler checks the entire program
written by user and if it is free from error
and mistakes then produces a complete
program in Machine language known as
object program.
• But if it founds some error in program then
it does not execute the single statement of
the program.
• So compiler translate whole program in
Machine language before it starts
Interpreters
• Interpreters performs the similar job like
compiler but in different way. It translates
(Interprets) one statement at a time and if
it is error – free then executes that
statement. This continues till the last
statement in the program has been
translated and executed.
• Thus Interpreter translates and executes
the statement before it goes to next
statement. When it founds some error in
Difference of Compiler –
Interpreter
• Error finding is much easier in Interpreter
because it checks and executes each
statement at a time. So wherever it fine
some error it will stop the execution.
• Where Compiler first check all the
statement for error and provide lists of all
the errors in the program.
• Interpreter take more time for the
execution of a program compared to
Compilers because it translates and
Cont…
• All programming languages can be divided
into two categories:
– Problem oriented languages or high
languages
– Machine oriented languages or Low Level
Languages
Problem oriented languages or
high languages
• Examples of languages falling in this
category are FORTRAN, BASIC, Pascal,
etc.
• These languages have been designed to
give a better programming efficiency,
faster program development. Generally
these languages have better programming
capability but they are less capable to deal
with hardware or Hardware related
programming.
Machine oriented languages or
Low Level Languages
• Examples of languages falling in this
category are Assembly language and
Machine Language.
• This languages have been designed to
give a better machine efficiency i.e. faster
program execution.
• Generally these languages have better
hardware programming capability but it is
very difficult and tedious to do create
complex application like and business

Weitere ähnliche Inhalte

Was ist angesagt?

4 evolution-of-programming-languages
4 evolution-of-programming-languages4 evolution-of-programming-languages
4 evolution-of-programming-languages
Rohit Shrivastava
 
1 - Introduction to Compilers.ppt
1 - Introduction to Compilers.ppt1 - Introduction to Compilers.ppt
1 - Introduction to Compilers.ppt
Rakesh Kumar
 

Was ist angesagt? (20)

Types of Programming Languages
Types of Programming LanguagesTypes of Programming Languages
Types of Programming Languages
 
C introduction by thooyavan
C introduction by  thooyavanC introduction by  thooyavan
C introduction by thooyavan
 
History of c
History of cHistory of c
History of c
 
Introduction to problem solving in C
Introduction to problem solving in CIntroduction to problem solving in C
Introduction to problem solving in C
 
C++ ppt
C++ pptC++ ppt
C++ ppt
 
C language
C languageC language
C language
 
Basics of c++
Basics of c++Basics of c++
Basics of c++
 
4 evolution-of-programming-languages
4 evolution-of-programming-languages4 evolution-of-programming-languages
4 evolution-of-programming-languages
 
Constants in java
Constants in javaConstants in java
Constants in java
 
High level and Low level Language
High level and Low level Language High level and Low level Language
High level and Low level Language
 
1 - Introduction to Compilers.ppt
1 - Introduction to Compilers.ppt1 - Introduction to Compilers.ppt
1 - Introduction to Compilers.ppt
 
Types of Programming Errors
Types of Programming ErrorsTypes of Programming Errors
Types of Programming Errors
 
Functions in c language
Functions in c language Functions in c language
Functions in c language
 
Structure of C program
Structure of C programStructure of C program
Structure of C program
 
C Language
C LanguageC Language
C Language
 
Lecture 21 - Preprocessor and Header File
Lecture 21 - Preprocessor and Header FileLecture 21 - Preprocessor and Header File
Lecture 21 - Preprocessor and Header File
 
Introduction of c programming
Introduction of c programmingIntroduction of c programming
Introduction of c programming
 
Introduction to programming
Introduction to programmingIntroduction to programming
Introduction to programming
 
JRE , JDK and platform independent nature of JAVA
JRE , JDK and platform independent nature of JAVAJRE , JDK and platform independent nature of JAVA
JRE , JDK and platform independent nature of JAVA
 
Programming in C Presentation upto FILE
Programming in C Presentation upto FILEProgramming in C Presentation upto FILE
Programming in C Presentation upto FILE
 

Ähnlich wie C programming

Introduction To C++ programming and its basic concepts
Introduction To C++ programming and its basic conceptsIntroduction To C++ programming and its basic concepts
Introduction To C++ programming and its basic concepts
ssuserf86fba
 

Ähnlich wie C programming (20)

C.pdf
C.pdfC.pdf
C.pdf
 
Programming in c
Programming in cProgramming in c
Programming in c
 
Programming in C
Programming in CProgramming in C
Programming in C
 
C programming
C programming C programming
C programming
 
INTRODUCTION TO C PROGRAMMING MATERIAL.pdf
INTRODUCTION TO C PROGRAMMING MATERIAL.pdfINTRODUCTION TO C PROGRAMMING MATERIAL.pdf
INTRODUCTION TO C PROGRAMMING MATERIAL.pdf
 
Translators(Compiler, Assembler) and interpreter
Translators(Compiler, Assembler) and interpreterTranslators(Compiler, Assembler) and interpreter
Translators(Compiler, Assembler) and interpreter
 
Compiler an overview
Compiler  an overviewCompiler  an overview
Compiler an overview
 
Introduction to programming language (basic)
Introduction to programming language (basic)Introduction to programming language (basic)
Introduction to programming language (basic)
 
week 2 - INTRO TO PROGRAMMING.pptx
week 2 - INTRO TO PROGRAMMING.pptxweek 2 - INTRO TO PROGRAMMING.pptx
week 2 - INTRO TO PROGRAMMING.pptx
 
Programming languages,compiler,interpreter,softwares
Programming languages,compiler,interpreter,softwaresProgramming languages,compiler,interpreter,softwares
Programming languages,compiler,interpreter,softwares
 
compiler vs interpreter
compiler vs interpretercompiler vs interpreter
compiler vs interpreter
 
C lecture notes new
C lecture notes newC lecture notes new
C lecture notes new
 
Intoduction to c language
Intoduction to c languageIntoduction to c language
Intoduction to c language
 
Introduction To C++ programming and its basic concepts
Introduction To C++ programming and its basic conceptsIntroduction To C++ programming and its basic concepts
Introduction To C++ programming and its basic concepts
 
Programming Paradigm & Languages
Programming Paradigm & LanguagesProgramming Paradigm & Languages
Programming Paradigm & Languages
 
Programming Paradigm & Languages
Programming Paradigm & LanguagesProgramming Paradigm & Languages
Programming Paradigm & Languages
 
Ic lecture8
Ic lecture8 Ic lecture8
Ic lecture8
 
Unit-1 (introduction to c language).pptx
Unit-1 (introduction to c language).pptxUnit-1 (introduction to c language).pptx
Unit-1 (introduction to c language).pptx
 
Fundamental of Information Technology - UNIT 7
Fundamental of Information Technology - UNIT 7Fundamental of Information Technology - UNIT 7
Fundamental of Information Technology - UNIT 7
 
Ppt 1
Ppt 1Ppt 1
Ppt 1
 

Mehr von Jigarthacker

Mehr von Jigarthacker (13)

File mangement
File mangementFile mangement
File mangement
 
Java session14
Java session14Java session14
Java session14
 
Java session13
Java session13Java session13
Java session13
 
Java session5
Java session5Java session5
Java session5
 
Java session4
Java session4Java session4
Java session4
 
Java session3
Java session3Java session3
Java session3
 
Java session2
Java session2Java session2
Java session2
 
Computer networks
Computer networksComputer networks
Computer networks
 
Unit 2
Unit 2Unit 2
Unit 2
 
Unit 1(sem-iv)
Unit 1(sem-iv)Unit 1(sem-iv)
Unit 1(sem-iv)
 
Unit 2
Unit 2Unit 2
Unit 2
 
Unit 1
Unit 1Unit 1
Unit 1
 
Basic object oriented approach
Basic object oriented approachBasic object oriented approach
Basic object oriented approach
 

Kürzlich hochgeladen

Kürzlich hochgeladen (20)

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 

C programming

  • 2. Cont.. • C is a general-purpose structured programming language that is powerful, efficient and compact. • C combines the features of high-level language with elements of the assembler and thus, the close to both man and machine (computer). • C was developed and implemented at Bell Laboratories in 1972 by Dennis Richie.
  • 3. Cont.. • Important of C or features of C. • It is a robust language whose rich set of built-in function and operators can be used to write any complex program. • The C compiler combines the capabilities of an assembly language with the features of a high-level language and therefore it was suited for writing both system software and business packages. In fact, many of compilers available in market are written in C. • Program written in C are efficient and fast, this is due to variety of data types and powerful operators. • There are only 32 keywords and its strength lies in its in-built functions. Several standard functions are available which can be used for developing programs. • C is highly portable, its means that C programs written for one computer can be run on another with little or no modification.
  • 4. Cont.. • C language is well suited structured programming, thus required the user to think of a program in terms of function modules or blocks. Proper collections of these modules make a complete program. This modular structure makes program debugging, testing and maintenance easier. • C is its ability to extend itself. A c program is basically collection of functions that are supported by the C library. We can continuously add our own function to the c library. Thus with availability of large number of functions, the programming task becomes simple.
  • 5. Cont.. • C Instructions: • Type declaration instructions: used to declare types of variables used in programs. E.g. int a; • Input/output instructions: used to input data required by program and information to be output on printer/screen. E.g. printf and scanf. • Arithmetic Instructions: arithmetic instruction done between constants and variables. Eg. Assignment statement. • Control instructions: To maintain order of execution of different statements control instruction are used. They are following types: • Unconditional control statement e.g Goto statement. • Decision control statement e.g. IF statement. • Loop control statement e.g For and do statement. • Case control statement .e.g Case statement.
  • 6. Cont.. • Basic structure of C programs: • 1. Documentation section: consists of a set of comments lines giving the name of program, author and other detail which programmer would like to use later. • 2. Link section: this section provides instruction to compiler to link function from system library. • 3. Definition Section: this section defines all symbolic constants. • 4. Global Declaration section: there are some variables that are used in more than one function. Such variables are called global variables and are declared in global definition section that is out side of all the functions.
  • 7. Cont.. • 5. Main( ) function section: every c program must have one main( ) function section and its divided in to two part one is declaration part and executable part. The declaration part declares all the variables used in executable part. There is at least one statement in executable part. And these two parts appear between opening and closing braces ( { } ). All the statements in the declaration and executable parts end with a semicolon ( ; ). • 6. Subprogram section: this section contains all the user-defined functions that are called in the main section. User-defined functions are generally placed immediately after the main function, although they may appear in any order.
  • 8. C Program Characteristics • Reliability: i.e the program can be depended upon always to do what is supposed to do. • Integrity: This refers to accuracy of the calculations. It should be clear that all the other program enhancements would be meaningless if the calculations were not carried out correctly. • Clarity or Readability: It refers to the overall readability of the program, with particular emphasis on its underlying logic. If the program is written clearly, it should be possible for another programmer to follow the logic without undue effort. • Maintainability: i.e. the program will be easy to change or modify when the need arises. • Portability: i.e. the program will be transferable to different computer with a minimum of modification.
  • 9. Cont.. • Performance or Efficiency: i.e. the program causes the tasks to be done quickly and efficiently. It also concerned with execution speed and efficient memory utilization this aid reliability, maintainability and portability. • Storage saving: i.e. the program is not allowed to be unnecessarily long. • Modularity: Many programs can be decomposed into series of identifiable sub tasks. It is good programming practices to implement each of these subtasks as a separate module. (In Pascal, such module refers as procedures and functions). The use a modular programming structure enhances the accuracy and clarity of a program, and it facilities future for program alterations.
  • 10. VARIABLES • A variable is a named data storage location in your computer’s memory. • By using a variable’s name in your program, you are, in effect, referring to the data stored there.
  • 11. VARIABLE NAMING CONVENTION • To use variables in your C programs, you must know ho to create variable names in • C,variables names must adhere to the following rules: – The name can contain letters, digits, and the underscore character(_). – The first character of the name must be a letter. The underscore is also a legal first character, but its use is not recommended. – Case matters (that is uppercase and lowercase letters). Thus, the names count and Count refer to two different variables. – C keywords can’t be used as variable names. A keyword is a word that is part of the C language.
  • 12. Different Programming Language • There are three different level of programming languages. They are • (1) Machine languages (low level) • (2) Assembly languages • (3) Procedure Oriented languages (high level) • (4) Fourth Generation languages (4 GLS)
  • 13. Cont… • (1) Machine Languages :- • Computers are made of No. of electronic components and they all are two – state electronic components means they understand only the 0 – (pulse) and 1 (non – pulse). • Therefore the instruction given to the computer must be written using binary numbers. 1and 0. • Computers do not understand English or
  • 14. Cont… • (2) Assembly Languages :- • As it was very tedious to understand and remember 0’s representing numerous data and instruction. • So to resolve this problem mnemonics codes were developed. For example add isused as symbolic code to represent addition. SUB is used for subtraction. • They are the symbolic representation of certain combination of binary numbers
  • 15. Cont.. • Which represents certain actions as computer understand only Machine language instructions a program written in Assembly Language must be translated into Machine languages. • Before it can be executed this translation if done by another program called assembler. This assembler will translate mnemonic codes into Machine languages.
  • 16. Cont… • (3) Procedure Oriented Languages • In earlier assembly languages assembler programs produced only one Machine languages instruction for every assembly languages instruction. • So to resolve this problem now assembler were introduced. Which can produce several machine level instructions for one assembly language instruction. • Thus programmer was relieve from the
  • 17. Cont.. • These languages are also called high level languages. Basic, Fortran, Pascal and COBOL. • The most important characteristic of high level languages is that it is machine independent and a program written in high level languages can be run on any computers with different architecture with no modification or very little modification.
  • 18. WHAT IS LANGUAGE TRANSLATORS? • As we know that computer understand only the instruction written in the Machine language. Therefore a program written in any other language should be translated to Machine language. For this purpose special programs are available they are called translators or language processors. This special programs accept the user program and check each statement and produces a corresponding
  • 19. Compiler • A Compiler checks the entire program written by user and if it is free from error and mistakes then produces a complete program in Machine language known as object program. • But if it founds some error in program then it does not execute the single statement of the program. • So compiler translate whole program in Machine language before it starts
  • 20. Interpreters • Interpreters performs the similar job like compiler but in different way. It translates (Interprets) one statement at a time and if it is error – free then executes that statement. This continues till the last statement in the program has been translated and executed. • Thus Interpreter translates and executes the statement before it goes to next statement. When it founds some error in
  • 21. Difference of Compiler – Interpreter • Error finding is much easier in Interpreter because it checks and executes each statement at a time. So wherever it fine some error it will stop the execution. • Where Compiler first check all the statement for error and provide lists of all the errors in the program. • Interpreter take more time for the execution of a program compared to Compilers because it translates and
  • 22. Cont… • All programming languages can be divided into two categories: – Problem oriented languages or high languages – Machine oriented languages or Low Level Languages
  • 23. Problem oriented languages or high languages • Examples of languages falling in this category are FORTRAN, BASIC, Pascal, etc. • These languages have been designed to give a better programming efficiency, faster program development. Generally these languages have better programming capability but they are less capable to deal with hardware or Hardware related programming.
  • 24. Machine oriented languages or Low Level Languages • Examples of languages falling in this category are Assembly language and Machine Language. • This languages have been designed to give a better machine efficiency i.e. faster program execution. • Generally these languages have better hardware programming capability but it is very difficult and tedious to do create complex application like and business