SlideShare a Scribd company logo
The University of Dodoma
High level programming Languages
Programming Language
There are three Programming languages
Machine Language
Assembly Language
High level Language
3
Low level PL
(Machine Language)
These a Binary coded instructions
The fundamental language of the computer’s
processor, also called Low Level Language.
All programs are converted into machine
language before they can be executed.
Consists of combination of 0’s and 1’s that
represent high and low electrical voltage.
4
Assembly Language
these are Symbolic coded instructions
A low level language that is similar to machine language.
Uses symbolic operation code to represent the machine operation
code.
Many assembly languages exist, one for each processor.
Despite differences, many assembly languages share the same
fundamental structure.
5
High Level Language
Computer (programming) languages
that are easier to learn.
Uses English like statements.
Examples are C ++, Visual Basic,
,Java ,Pascal, Fortran and …....
Programming Language Generations
First Generation
(late 1940s):
Machine-level
programming languages
 Fast and efficient, executed
directly on the CPU
 Consists only of 0s and 1s
 Difficult for humans to read,
write, and debug
Programming Language Generations
Second Generation
(early 1950s):
 Symbolic assemblers
 Interpreting routines
 Very early compilers
Assembly languages
 Simple mnemonic instructions <opcode> <operands>
 Assembler translates into machine code
 Handcoding in assembly only for low-level needs
Programming Language Generations
Third Generation
(mid 1950s - present):
High level, general-purpose
 FORTRAN, LISP, COBOL, ALGOL
(Ada, Basic, C, C++, Java, Pascal, Smalltalk, …)
 Easier for humans to read, write, debug
 Compiler translates into machine code before
running
 Interpreter translates into machine code at
runtime
Programming Language Generations
Fourth Generation (1970s - ):
Specification languages, query languages, report
generators, systems engineering
 Maple, Mathematica, Postscript, SPSS, SQL
Fifth Generation (1980s - ):
Solve problems using constraints rather than
algorithms, used in Artificial Intelligence
 Prolog
Translating a C++ program
University of Dodoma-cive 10
Creating a source file
It is important to use the correct file extension depends on the
compiler you use, the most commonly found file extensiosare .cpp
and .cc.
11
Explanations
1.First, a text editor is used to save the C++
program in a text file. In other words,the
source code is saved to a source file.
2.The source file is put through a compiler for
translation. If everything works as planned, an
object file made up of machine code is
created. The object file is also referred to as a
module.
12
Compilers
Compilers is a program that translate high-level language to
machine language
The compiler on your system converts
source code to object code.
 Source code
 the original program in a high level language
 Object code
 the translated version in machine language
8-14
Compilers ……
Figure 8.1 Compilation process
8-15
Interpreters
Interpreter: a translating program and executes the
statements in sequence
 Unlike an assembler or compiler which produce machine
code as output, which is then executed in a separate step
 An interpreter translates a statement and then immediately
executes the statement
 Interpreters can be viewed as simulators
Chapter 17 Programming Tools 17-16
Linkers
Searches program libraries to find library
routines used by the program
 Library: collection of pre-written functions and
subroutines made available to perform commonly
required activities
Determines the memory locations that code
from each module will occupy and relocates
instructions by adjusting absolute references
Resolves references among files
Finally, the linker combines the object file with other
modules to form an executable
file. These further modules contain functions from
standard libraries or
parts of the program that have been compiled
previously.
17
Transformation of a high-level
language into machine …..
18
Contents of a program
19
Pre-processor Directives
Preprocessing
 Occurs before a program is compiled
 Inclusion of other files
 Definition of symbolic constants and macros
 Conditional compilation of program code
 Conditional execution of preprocessor directives
Format of preprocessor directives
 Lines begin with #
 Only whitespace characters before directives on a line
13.2 The #include Preprocessor
Directive#include
 Copy of a specified file included in place of the directive
#include <filename> -
 Searches standard library for file
 Use for standard library files
#include "filename"
 Searches current directory, then standard library
 Use for user-defined files
Used for
 Loading header files (#include <iostream>)
 Programs with multiple source files to be compiled together
 Header file - has common declarations and definitions (classes,
structures, function prototypes)
 #include statement in each file

More Related Content

PDF
Introduction to systems programming
PDF
Introduction to compiler development
PPTX
Ss ui lecture 1
DOCX
Compliers and interpreters
PPTX
Compiler design
PPT
Introduction to compiler
PPT
Chapter One
PPTX
Linkers
Introduction to systems programming
Introduction to compiler development
Ss ui lecture 1
Compliers and interpreters
Compiler design
Introduction to compiler
Chapter One
Linkers

What's hot (19)

PPT
Introduction to Compiler Construction
PPSX
PPTX
Assembly language
PPTX
Programming in c
PPTX
COMPILER DESIGN OPTIONS
PDF
Prof. Chethan Raj C, BE, M.Tech (Ph.D) Dept. of CSE. System Software & Operat...
PPT
Introduction to Compiler design
PPTX
Compiler Construction Course - Introduction
PPT
basics of compiler design
PPTX
Assembly language progarmming
PDF
COMPILER DESIGN- Introduction & Lexical Analysis:
PDF
Chapter#01 cc
PPT
Introduction to Compiler
PPT
Compiler Design Basics
PPT
Compiler Construction introduction
PPTX
Compiler vs Interpreter-Compiler design ppt.
PPTX
System programming
PPTX
Assembly language programming
Introduction to Compiler Construction
Assembly language
Programming in c
COMPILER DESIGN OPTIONS
Prof. Chethan Raj C, BE, M.Tech (Ph.D) Dept. of CSE. System Software & Operat...
Introduction to Compiler design
Compiler Construction Course - Introduction
basics of compiler design
Assembly language progarmming
COMPILER DESIGN- Introduction & Lexical Analysis:
Chapter#01 cc
Introduction to Compiler
Compiler Design Basics
Compiler Construction introduction
Compiler vs Interpreter-Compiler design ppt.
System programming
Assembly language programming
Ad

Similar to 2 c++ programming languages (20)

PPT
introduction computer programming languages
PPTX
Compilers.pptx
PPT
Introduction Computer programming and operating system
PPT
introduction to computer programming and its examples
PPT
presentation of Programing fundamental.
PPTX
For EETggggggggggggggggggggggggggggggggggg
PPT
Introduction to C for Btech 1st year.ppt
PPTX
computer programming and hardware technique
PPTX
Introduction to Programming Concepts By Aamir Saleem Ansari
PPT
Lahor main It revoloution anfd its uses.
PPT
basics of it in pakistan and all over the
PPTX
Computer Languages & its genearations.pptx
PPT
Session01 basics programming
PPTX
Lesson 2.pptx
PPT
Compiler design lessons notes from Semester
PDF
Languages in computer
PPTX
1. C_Introductionnnnnnnnnnnnnnnnnnnnn.pptx
PPTX
Basic programming concepts
PPTX
Programming Fundamental Slide No.1
introduction computer programming languages
Compilers.pptx
Introduction Computer programming and operating system
introduction to computer programming and its examples
presentation of Programing fundamental.
For EETggggggggggggggggggggggggggggggggggg
Introduction to C for Btech 1st year.ppt
computer programming and hardware technique
Introduction to Programming Concepts By Aamir Saleem Ansari
Lahor main It revoloution anfd its uses.
basics of it in pakistan and all over the
Computer Languages & its genearations.pptx
Session01 basics programming
Lesson 2.pptx
Compiler design lessons notes from Semester
Languages in computer
1. C_Introductionnnnnnnnnnnnnnnnnnnnn.pptx
Basic programming concepts
Programming Fundamental Slide No.1
Ad

Recently uploaded (20)

DOCX
A Contemporary Luxury Villa in Dubai Jumeirah-2.docx
PDF
Design Thinking - Module 1 - Introduction To Design Thinking - Dr. Rohan Dasg...
PDF
Pongal 2026 Sponsorship Presentation - Bhopal Tamil Sangam
PDF
GSH-Vicky1-Complete-Plans on Housing.pdf
PPTX
NEW EIA PART B - Group 5 (Section 50).pptx
PPTX
LITERATURE CASE STUDY DESIGN SEMESTER 5.pptx
PDF
UNIT 1 Introduction fnfbbfhfhfbdhdbdto Java.pptx.pdf
PDF
Facade & Landscape Lighting Techniques and Trends.pptx.pdf
PPT
Machine printing techniques and plangi dyeing
PPTX
An introduction to AI in research and reference management
PPT
WHY_R12 Uaafafafpgradeaffafafafaffff.ppt
PPTX
BSCS lesson 3.pptxnbbjbb mnbkjbkbbkbbkjb
PDF
ART & DESIGN HISTORY OF VEDIC CIVILISATION.pdf
PDF
intro_to_rust.pptx_123456789012446789.pdf
PPTX
CLASSIFICATION OF YARN- process, explanation
PPTX
Orthtotics presentation regarding physcial therapy
PPT
pump pump is a mechanism that is used to transfer a liquid from one place to ...
PPTX
DOC-20250430-WA0014._20250714_235747_0000.pptx
PPTX
Causes of Flooding by Slidesgo sdnl;asnjdl;asj.pptx
PDF
Urban Design Final Project-Context
A Contemporary Luxury Villa in Dubai Jumeirah-2.docx
Design Thinking - Module 1 - Introduction To Design Thinking - Dr. Rohan Dasg...
Pongal 2026 Sponsorship Presentation - Bhopal Tamil Sangam
GSH-Vicky1-Complete-Plans on Housing.pdf
NEW EIA PART B - Group 5 (Section 50).pptx
LITERATURE CASE STUDY DESIGN SEMESTER 5.pptx
UNIT 1 Introduction fnfbbfhfhfbdhdbdto Java.pptx.pdf
Facade & Landscape Lighting Techniques and Trends.pptx.pdf
Machine printing techniques and plangi dyeing
An introduction to AI in research and reference management
WHY_R12 Uaafafafpgradeaffafafafaffff.ppt
BSCS lesson 3.pptxnbbjbb mnbkjbkbbkbbkjb
ART & DESIGN HISTORY OF VEDIC CIVILISATION.pdf
intro_to_rust.pptx_123456789012446789.pdf
CLASSIFICATION OF YARN- process, explanation
Orthtotics presentation regarding physcial therapy
pump pump is a mechanism that is used to transfer a liquid from one place to ...
DOC-20250430-WA0014._20250714_235747_0000.pptx
Causes of Flooding by Slidesgo sdnl;asnjdl;asj.pptx
Urban Design Final Project-Context

2 c++ programming languages

  • 1. The University of Dodoma High level programming Languages
  • 2. Programming Language There are three Programming languages Machine Language Assembly Language High level Language
  • 3. 3 Low level PL (Machine Language) These a Binary coded instructions The fundamental language of the computer’s processor, also called Low Level Language. All programs are converted into machine language before they can be executed. Consists of combination of 0’s and 1’s that represent high and low electrical voltage.
  • 4. 4 Assembly Language these are Symbolic coded instructions A low level language that is similar to machine language. Uses symbolic operation code to represent the machine operation code. Many assembly languages exist, one for each processor. Despite differences, many assembly languages share the same fundamental structure.
  • 5. 5 High Level Language Computer (programming) languages that are easier to learn. Uses English like statements. Examples are C ++, Visual Basic, ,Java ,Pascal, Fortran and …....
  • 6. Programming Language Generations First Generation (late 1940s): Machine-level programming languages  Fast and efficient, executed directly on the CPU  Consists only of 0s and 1s  Difficult for humans to read, write, and debug
  • 7. Programming Language Generations Second Generation (early 1950s):  Symbolic assemblers  Interpreting routines  Very early compilers Assembly languages  Simple mnemonic instructions <opcode> <operands>  Assembler translates into machine code  Handcoding in assembly only for low-level needs
  • 8. Programming Language Generations Third Generation (mid 1950s - present): High level, general-purpose  FORTRAN, LISP, COBOL, ALGOL (Ada, Basic, C, C++, Java, Pascal, Smalltalk, …)  Easier for humans to read, write, debug  Compiler translates into machine code before running  Interpreter translates into machine code at runtime
  • 9. Programming Language Generations Fourth Generation (1970s - ): Specification languages, query languages, report generators, systems engineering  Maple, Mathematica, Postscript, SPSS, SQL Fifth Generation (1980s - ): Solve problems using constraints rather than algorithms, used in Artificial Intelligence  Prolog
  • 10. Translating a C++ program University of Dodoma-cive 10
  • 11. Creating a source file It is important to use the correct file extension depends on the compiler you use, the most commonly found file extensiosare .cpp and .cc. 11
  • 12. Explanations 1.First, a text editor is used to save the C++ program in a text file. In other words,the source code is saved to a source file. 2.The source file is put through a compiler for translation. If everything works as planned, an object file made up of machine code is created. The object file is also referred to as a module. 12
  • 13. Compilers Compilers is a program that translate high-level language to machine language The compiler on your system converts source code to object code.  Source code  the original program in a high level language  Object code  the translated version in machine language
  • 14. 8-14 Compilers …… Figure 8.1 Compilation process
  • 15. 8-15 Interpreters Interpreter: a translating program and executes the statements in sequence  Unlike an assembler or compiler which produce machine code as output, which is then executed in a separate step  An interpreter translates a statement and then immediately executes the statement  Interpreters can be viewed as simulators
  • 16. Chapter 17 Programming Tools 17-16 Linkers Searches program libraries to find library routines used by the program  Library: collection of pre-written functions and subroutines made available to perform commonly required activities Determines the memory locations that code from each module will occupy and relocates instructions by adjusting absolute references Resolves references among files
  • 17. Finally, the linker combines the object file with other modules to form an executable file. These further modules contain functions from standard libraries or parts of the program that have been compiled previously. 17
  • 18. Transformation of a high-level language into machine ….. 18
  • 19. Contents of a program 19
  • 20. Pre-processor Directives Preprocessing  Occurs before a program is compiled  Inclusion of other files  Definition of symbolic constants and macros  Conditional compilation of program code  Conditional execution of preprocessor directives Format of preprocessor directives  Lines begin with #  Only whitespace characters before directives on a line
  • 21. 13.2 The #include Preprocessor Directive#include  Copy of a specified file included in place of the directive #include <filename> -  Searches standard library for file  Use for standard library files #include "filename"  Searches current directory, then standard library  Use for user-defined files Used for  Loading header files (#include <iostream>)  Programs with multiple source files to be compiled together  Header file - has common declarations and definitions (classes, structures, function prototypes)  #include statement in each file