SlideShare a Scribd company logo
1 of 36
Computer Programming I
Computer Programming I
Computer Programming I
ARPonix.com
Skills expected to be acquired
• Problem solving and software development
using C++ language
• The use of a range of software tools and
packages (compiler, development environment,
debugger, word processor)
• Practical skills in an operating system
environment (Windows) and the use of the
internet and online resources
Computer Programming I
Lecture 1
Introduction
to
Computers & Programming
Computer Programming I
ARPonix.com
Overview
• Computer systems
• Programming languages
• Compiler
• Linker
Computer Programming I
ARPonix.com
Computer System
• A computer program is…
– A set of instructions for a computer to follow
• Computer software is …
– The collection of programs used by a computer
• Includes:
• Editors
• Translators
• System Managers
Computer Programming I
ARPonix.com
Hardware
• Three main classes of computers
– PCs (Personal Computer)
• Relatively small used by one person at a time
– Workstation
• Larger and more powerful than a PC
– Mainframe
• Still larger
• Requires support staff
• Shared by multiple users
Computer Programming I
ARPonix.com
Networks
• A number of computers connected to
share resources
– Share printers and other devices
– Share information
Computer Programming I
ARPonix.com
Computer Organization
Computer Programming I
ARPonix.com
Computer Organization
– Five main components
1) Input devices
– Allows communication to the computer
2) Output devices
– Allows communication to the user
3) Processor (CPU)
4) Main memory
– Memory locations containing the running program
5) Secondary memory
– Permanent record of data often on a disk
Computer Programming I
ARPonix.com
Computer Memory
• Main Memory
– Long list of memory locations
• Each contains zeros and ones
• Can change during program execution
– Binary Digit or Bit
• A digit that can only be zero or one
– Byte
• Each memory location has eight bits
– Address
• Number that identifies a memory location
Computer Programming I
ARPonix.com
Larger Data Items
• Some data is too large for a single byte
– Most integers and real numbers are too large
– Address refers to the first byte
– Next few consecutive bytes can store the
additional bits for larger data
Computer Programming I
ARPonix.com
Computer Programming I
ARPonix.com
Data or Code?
• ‘A’ may look like 01000001
• 65 may look like 01000001
• An instruction may look like 01000001
• How does the computer know the meaning
of 01000001?
– Interpretation depends on the current instruction
• Programmers rarely need to be concerned with
this problem.
– Reason as if memory locations contain letters and
numbers rather than zeroes and ones
Computer Programming I
ARPonix.com
Secondary Memory
• Main memory stores instructions and
data while a program is running.
• Secondary memory
– Stores instructions and data between sessions
– A file stores data or instructions in secondary
memory
Computer Programming I
ARPonix.com
Secondary Memory Media
• A computer might have any of these
types of secondary memory
– Hard disk
• Fast
• Fixed in the computer and not normally removed
– Floppy disk
• Slow
• Easily shared with other computers
– Compact disk
• Slower than hard disks
• Easily shared with other computers
• Can be read only or re-writable
Computer Programming I
ARPonix.com
Memory Access
• Random Access
– Usually called RAM
• Computer can directly access any memory location
• Sequential Access
– Data is generally found by searching through
other items first
• More common in secondary memory
Computer Programming I
ARPonix.com
The Processor
• Typically called the CPU
– Central Processing Unit
– Follows program instructions
– Typical capabilities of CPU include:
• add
• subtract
• multiply
• divide
• move data from location to location
Computer Programming I
ARPonix.com
Computer Software
• The operating system
– Allows us to communicate with the computer
– Is a program
– Allocates the computer’s resources
– Responds to user requests to run other programs
• Common operating systems include…
– UNIX Linux DOS
Windows Macintosh VMS
Computer Programming I
ARPonix.com
Computer Input
• Computer input consists of
– A program
– Some data
Computer Programming I
ARPonix.com
Computer Input
Computer Programming I
ARPonix.com
High-level Languages
• Common programming languages include …
C C++ Java Pascal Visual Basic FORTRAN
COBOL Lisp Scheme Ada
• These high – level languages
– Resemble human languages
– Are designed to be easy to read and write
– Use more complicated instructions than
the CPU can follow
– Must be translated to zeros and ones for the CPU
to execute a program
Computer Programming I
ARPonix.com
Low-level Languages
• An assembly language command such as
ADD X Y Z
might mean add the values found at x and y
in memory, and store the result in location z.
• Assembly language must be translated to
machine language (zeros and ones)
0110 1001 1010 1011
• The CPU can follow machine language
Computer Programming I
ARPonix.com
Programming Languages
•Various programming languages enable
people to tell computers what to do
•Foundation for developing applications
Computer Programming I
ARPonix.com
Programming Languages
• Machine Language (first generation)
– The computer’s ‘native language’
– Composed of binary digits (0s, 1s)
 Eg. 0110 1001 1010 1011
– The only language that computers understand
• Assembly Language (second generation)
– One-to-one correspondence to machine language
– Somewhat more user-friendly than machine language
(mnemonic rather than binary digits)
 Eg. ADD X Y Z
– Assembler – program that translates an assembly language
program into machine language
Computer Programming I
ARPonix.com
• Procedural Languages (third generation)
– One instruction translates into many machine language
instructions
– Programs describe the computer’s processing step-by-
step
– Closer to natural language; uses common words rather
than abbreviated mnemonics
– Examples: C, C++, Java, Fortran, QuickBasic
– Compiler - translates the entire program at once
– Interpreter - translates and executes one source program
statement at a time
Programming Languages
Computer Programming I
ARPonix.com
• Nonprocedural Languages (fourth generation)
– Allows the user to specify the desired result without
having to specify the detailed procedures needed for
achieving the result
Example: – database query language - SQL
Can be used by non technical users
• Natural Language Programming Languages (fifth
generation (intelligent) languages)
– Translates natural languages into a structured, machine-
readable form
– Are extremely complex and experimental
Programming Languages
Computer Programming I
ARPonix.com
• Object-Oriented Programming Languages (OOP)
– based on objects – packaging data and the instructions about
what to do with that data together
– Examples: Java, C++
• Visual Programming Languages
– Used within a graphical environment
– Examples : Visual Basic and Visual C++
– Popular to non technical users.
Current Programming Languages
Computer Programming I
ARPonix.com
• Hypertext Markup Language (HTML)
– standard language used in World Wide Web
– contains text, images, and other types of information
such as data files, audio, video, and executable
computer programs
• Extensible Markup Language (XML)
– Improved on web document functionality
• Virtual Reality Modeling Language (VRML)
– a file format for describing three-dimensional (3D)
interactive worlds and objects
– can be used with the World Wide Web
Current Programming Languages
Computer Programming I
ARPonix.com
Compilers
• Translate high-level language to
machine language
– Source code
• The original program in a high level language
– Object code
• The translated version in machine language
Computer Programming I
ARPonix.com
Compilers
Computer Programming I
ARPonix.com
Linkers
• Some programs we use are already compiled
– Their object code is available for us to use
– For example: Input and output routines
• A Linker combines
– The object code for the programs we write
and
– The object code for the pre-compiled routines
into
– The machine language program the CPU can run
Computer Programming I
ARPonix.com
Linkers
Computer Programming I
ARPonix.com
How are Programs Understood by
the Computer?
Program written in
programming
language
(source code)
Translator
program
 Assembler
 Compiler
 Interpreter
Program written in
machine language
(object code)
Processed
By CPU
 The Language Translation Process
Computer Programming I
ARPonix.com
History Note
• First programmable computer
– Designed by Charles Babbage
– Began work in 1822
– Not completed in Babbage’s life time
• First programmer
– Ada Augusta, Countess of Lovelace
• Colleague of Babbage
Computer Programming I
ARPonix.com
Resources
• C++ Primer Plus.
• Starting Out with C++.
• Problem Solving with C++.
• The C++ Programming Language.
• My own experiences, specially about examples.
Computer Programming I
ARPonix.com
End

More Related Content

What's hot

Ch0 computer systems overview
Ch0 computer systems overviewCh0 computer systems overview
Ch0 computer systems overviewAboubakarIbrahima
 
Introductiontocomputerprogramming 140713205433-phpapp02
Introductiontocomputerprogramming 140713205433-phpapp02Introductiontocomputerprogramming 140713205433-phpapp02
Introductiontocomputerprogramming 140713205433-phpapp02Lanie Plecerda
 
Computer software and operating system
Computer software and operating systemComputer software and operating system
Computer software and operating systemsonykhan3
 
computer language with full detail
computer language with full detail computer language with full detail
computer language with full detail sonykhan3
 
Unit 2 computer software
Unit 2 computer softwareUnit 2 computer software
Unit 2 computer softwareHardik Patel
 
Introduction to computer software12 9-07
Introduction to computer software12 9-07Introduction to computer software12 9-07
Introduction to computer software12 9-07itis103
 
Bba i-introduction to computer-u-2- application and system software
Bba  i-introduction to computer-u-2- application and system softwareBba  i-introduction to computer-u-2- application and system software
Bba i-introduction to computer-u-2- application and system softwareRai University
 
Embedded systems tools & peripherals
Embedded systems   tools & peripheralsEmbedded systems   tools & peripherals
Embedded systems tools & peripheralsimtiazalijoono
 
Programming languages and paradigms
Programming languages and paradigmsProgramming languages and paradigms
Programming languages and paradigmsJohn Paul Hallasgo
 
Computer Programming: Chapter 1
Computer Programming: Chapter 1Computer Programming: Chapter 1
Computer Programming: Chapter 1Atit Patumvan
 
Lecture 3 - Processors, Memory and I/O devices
Lecture 3 - Processors, Memory and I/O devicesLecture 3 - Processors, Memory and I/O devices
Lecture 3 - Processors, Memory and I/O devicesMd. Imran Hossain Showrov
 
Introduction to Computers Lecture # 11
Introduction to Computers Lecture # 11Introduction to Computers Lecture # 11
Introduction to Computers Lecture # 11Sehrish Rafiq
 
Describe professional programing languages and talks
Describe professional programing languages and talks Describe professional programing languages and talks
Describe professional programing languages and talks Ed Bray
 

What's hot (19)

Ch0 computer systems overview
Ch0 computer systems overviewCh0 computer systems overview
Ch0 computer systems overview
 
Introductiontocomputerprogramming 140713205433-phpapp02
Introductiontocomputerprogramming 140713205433-phpapp02Introductiontocomputerprogramming 140713205433-phpapp02
Introductiontocomputerprogramming 140713205433-phpapp02
 
Computer software and operating system
Computer software and operating systemComputer software and operating system
Computer software and operating system
 
computer language with full detail
computer language with full detail computer language with full detail
computer language with full detail
 
1. intro to comp & c++ programming
1. intro to comp & c++ programming1. intro to comp & c++ programming
1. intro to comp & c++ programming
 
Unit 2 computer software
Unit 2 computer softwareUnit 2 computer software
Unit 2 computer software
 
Introduction to computer software12 9-07
Introduction to computer software12 9-07Introduction to computer software12 9-07
Introduction to computer software12 9-07
 
Bba i-introduction to computer-u-2- application and system software
Bba  i-introduction to computer-u-2- application and system softwareBba  i-introduction to computer-u-2- application and system software
Bba i-introduction to computer-u-2- application and system software
 
Introduction to Computer Programming
Introduction to Computer ProgrammingIntroduction to Computer Programming
Introduction to Computer Programming
 
Embedded systems tools & peripherals
Embedded systems   tools & peripheralsEmbedded systems   tools & peripherals
Embedded systems tools & peripherals
 
Programming languages and paradigms
Programming languages and paradigmsProgramming languages and paradigms
Programming languages and paradigms
 
Lecture 4- Computer Software and Languages
Lecture 4- Computer Software and LanguagesLecture 4- Computer Software and Languages
Lecture 4- Computer Software and Languages
 
Computer Programming: Chapter 1
Computer Programming: Chapter 1Computer Programming: Chapter 1
Computer Programming: Chapter 1
 
Lecture 3 - Processors, Memory and I/O devices
Lecture 3 - Processors, Memory and I/O devicesLecture 3 - Processors, Memory and I/O devices
Lecture 3 - Processors, Memory and I/O devices
 
Information systems software
Information systems softwareInformation systems software
Information systems software
 
Computer software
Computer softwareComputer software
Computer software
 
Introduction to Computers Lecture # 11
Introduction to Computers Lecture # 11Introduction to Computers Lecture # 11
Introduction to Computers Lecture # 11
 
Lecture 2 - Introductory Concepts
Lecture 2 - Introductory ConceptsLecture 2 - Introductory Concepts
Lecture 2 - Introductory Concepts
 
Describe professional programing languages and talks
Describe professional programing languages and talks Describe professional programing languages and talks
Describe professional programing languages and talks
 

Similar to C++ Training - Lecture 01

Overview of computers and programming
Overview of computers and programmingOverview of computers and programming
Overview of computers and programmingJason J Pulikkottil
 
Session01 basics programming
Session01 basics programmingSession01 basics programming
Session01 basics programmingHarithaRanasinghe
 
Programming Fundamentals and Programming Languages Concepts
Programming Fundamentals and Programming Languages ConceptsProgramming Fundamentals and Programming Languages Concepts
Programming Fundamentals and Programming Languages Conceptsimtiazalijoono
 
introduction computer programming languages
introduction computer programming languages introduction computer programming languages
introduction computer programming languages BakhatAli3
 
Synapseindia dot net development computer programming
Synapseindia dot net development  computer programmingSynapseindia dot net development  computer programming
Synapseindia dot net development computer programmingSynapseindiappsdevelopment
 
Computer, generations, languages, soft wares
Computer, generations, languages, soft waresComputer, generations, languages, soft wares
Computer, generations, languages, soft wareskiranmohan42
 
Introduction to computers and programming languages
Introduction to computers and programming languages Introduction to computers and programming languages
Introduction to computers and programming languages binoysatheesh
 
Python-unit -I.pptx
Python-unit -I.pptxPython-unit -I.pptx
Python-unit -I.pptxcrAmth
 
Embedded c c++ programming fundamentals master
Embedded c c++ programming fundamentals masterEmbedded c c++ programming fundamentals master
Embedded c c++ programming fundamentals masterHossam Hassan
 
COMPUTER LANGUAGES AND PROGRAMMING
COMPUTER LANGUAGES AND PROGRAMMINGCOMPUTER LANGUAGES AND PROGRAMMING
COMPUTER LANGUAGES AND PROGRAMMINGABHINAV SINGH
 
Introduction_to_Programming.pptx
Introduction_to_Programming.pptxIntroduction_to_Programming.pptx
Introduction_to_Programming.pptxPmarkNorcio
 
Python-L1.pptx
Python-L1.pptxPython-L1.pptx
Python-L1.pptxDukeCalvin
 

Similar to C++ Training - Lecture 01 (20)

Chapter1.ppt
Chapter1.pptChapter1.ppt
Chapter1.ppt
 
Overview of computers and programming
Overview of computers and programmingOverview of computers and programming
Overview of computers and programming
 
Session01 basics programming
Session01 basics programmingSession01 basics programming
Session01 basics programming
 
Programming Fundamentals and Programming Languages Concepts
Programming Fundamentals and Programming Languages ConceptsProgramming Fundamentals and Programming Languages Concepts
Programming Fundamentals and Programming Languages Concepts
 
introduction computer programming languages
introduction computer programming languages introduction computer programming languages
introduction computer programming languages
 
Synapseindia dot net development computer programming
Synapseindia dot net development  computer programmingSynapseindia dot net development  computer programming
Synapseindia dot net development computer programming
 
Computer Programming - Lecture 1
Computer Programming - Lecture 1Computer Programming - Lecture 1
Computer Programming - Lecture 1
 
lec 1.pptx
lec 1.pptxlec 1.pptx
lec 1.pptx
 
System softare
System softareSystem softare
System softare
 
Computer, generations, languages, soft wares
Computer, generations, languages, soft waresComputer, generations, languages, soft wares
Computer, generations, languages, soft wares
 
Introduction to computers and programming languages
Introduction to computers and programming languages Introduction to computers and programming languages
Introduction to computers and programming languages
 
Program Logic and Design
Program Logic and DesignProgram Logic and Design
Program Logic and Design
 
Python-unit -I.pptx
Python-unit -I.pptxPython-unit -I.pptx
Python-unit -I.pptx
 
Caim ppt
Caim pptCaim ppt
Caim ppt
 
Computer Languages
Computer Languages Computer Languages
Computer Languages
 
Embedded c c++ programming fundamentals master
Embedded c c++ programming fundamentals masterEmbedded c c++ programming fundamentals master
Embedded c c++ programming fundamentals master
 
a1.pptx.pdf
a1.pptx.pdfa1.pptx.pdf
a1.pptx.pdf
 
COMPUTER LANGUAGES AND PROGRAMMING
COMPUTER LANGUAGES AND PROGRAMMINGCOMPUTER LANGUAGES AND PROGRAMMING
COMPUTER LANGUAGES AND PROGRAMMING
 
Introduction_to_Programming.pptx
Introduction_to_Programming.pptxIntroduction_to_Programming.pptx
Introduction_to_Programming.pptx
 
Python-L1.pptx
Python-L1.pptxPython-L1.pptx
Python-L1.pptx
 

Recently uploaded

(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...ranjana rawat
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...RajaP95
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxhumanexperienceaaa
 

Recently uploaded (20)

(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
 

C++ Training - Lecture 01

  • 2. Computer Programming I ARPonix.com Skills expected to be acquired • Problem solving and software development using C++ language • The use of a range of software tools and packages (compiler, development environment, debugger, word processor) • Practical skills in an operating system environment (Windows) and the use of the internet and online resources
  • 3. Computer Programming I Lecture 1 Introduction to Computers & Programming
  • 4. Computer Programming I ARPonix.com Overview • Computer systems • Programming languages • Compiler • Linker
  • 5. Computer Programming I ARPonix.com Computer System • A computer program is… – A set of instructions for a computer to follow • Computer software is … – The collection of programs used by a computer • Includes: • Editors • Translators • System Managers
  • 6. Computer Programming I ARPonix.com Hardware • Three main classes of computers – PCs (Personal Computer) • Relatively small used by one person at a time – Workstation • Larger and more powerful than a PC – Mainframe • Still larger • Requires support staff • Shared by multiple users
  • 7. Computer Programming I ARPonix.com Networks • A number of computers connected to share resources – Share printers and other devices – Share information
  • 9. Computer Programming I ARPonix.com Computer Organization – Five main components 1) Input devices – Allows communication to the computer 2) Output devices – Allows communication to the user 3) Processor (CPU) 4) Main memory – Memory locations containing the running program 5) Secondary memory – Permanent record of data often on a disk
  • 10. Computer Programming I ARPonix.com Computer Memory • Main Memory – Long list of memory locations • Each contains zeros and ones • Can change during program execution – Binary Digit or Bit • A digit that can only be zero or one – Byte • Each memory location has eight bits – Address • Number that identifies a memory location
  • 11. Computer Programming I ARPonix.com Larger Data Items • Some data is too large for a single byte – Most integers and real numbers are too large – Address refers to the first byte – Next few consecutive bytes can store the additional bits for larger data
  • 13. Computer Programming I ARPonix.com Data or Code? • ‘A’ may look like 01000001 • 65 may look like 01000001 • An instruction may look like 01000001 • How does the computer know the meaning of 01000001? – Interpretation depends on the current instruction • Programmers rarely need to be concerned with this problem. – Reason as if memory locations contain letters and numbers rather than zeroes and ones
  • 14. Computer Programming I ARPonix.com Secondary Memory • Main memory stores instructions and data while a program is running. • Secondary memory – Stores instructions and data between sessions – A file stores data or instructions in secondary memory
  • 15. Computer Programming I ARPonix.com Secondary Memory Media • A computer might have any of these types of secondary memory – Hard disk • Fast • Fixed in the computer and not normally removed – Floppy disk • Slow • Easily shared with other computers – Compact disk • Slower than hard disks • Easily shared with other computers • Can be read only or re-writable
  • 16. Computer Programming I ARPonix.com Memory Access • Random Access – Usually called RAM • Computer can directly access any memory location • Sequential Access – Data is generally found by searching through other items first • More common in secondary memory
  • 17. Computer Programming I ARPonix.com The Processor • Typically called the CPU – Central Processing Unit – Follows program instructions – Typical capabilities of CPU include: • add • subtract • multiply • divide • move data from location to location
  • 18. Computer Programming I ARPonix.com Computer Software • The operating system – Allows us to communicate with the computer – Is a program – Allocates the computer’s resources – Responds to user requests to run other programs • Common operating systems include… – UNIX Linux DOS Windows Macintosh VMS
  • 19. Computer Programming I ARPonix.com Computer Input • Computer input consists of – A program – Some data
  • 21. Computer Programming I ARPonix.com High-level Languages • Common programming languages include … C C++ Java Pascal Visual Basic FORTRAN COBOL Lisp Scheme Ada • These high – level languages – Resemble human languages – Are designed to be easy to read and write – Use more complicated instructions than the CPU can follow – Must be translated to zeros and ones for the CPU to execute a program
  • 22. Computer Programming I ARPonix.com Low-level Languages • An assembly language command such as ADD X Y Z might mean add the values found at x and y in memory, and store the result in location z. • Assembly language must be translated to machine language (zeros and ones) 0110 1001 1010 1011 • The CPU can follow machine language
  • 23. Computer Programming I ARPonix.com Programming Languages •Various programming languages enable people to tell computers what to do •Foundation for developing applications
  • 24. Computer Programming I ARPonix.com Programming Languages • Machine Language (first generation) – The computer’s ‘native language’ – Composed of binary digits (0s, 1s)  Eg. 0110 1001 1010 1011 – The only language that computers understand • Assembly Language (second generation) – One-to-one correspondence to machine language – Somewhat more user-friendly than machine language (mnemonic rather than binary digits)  Eg. ADD X Y Z – Assembler – program that translates an assembly language program into machine language
  • 25. Computer Programming I ARPonix.com • Procedural Languages (third generation) – One instruction translates into many machine language instructions – Programs describe the computer’s processing step-by- step – Closer to natural language; uses common words rather than abbreviated mnemonics – Examples: C, C++, Java, Fortran, QuickBasic – Compiler - translates the entire program at once – Interpreter - translates and executes one source program statement at a time Programming Languages
  • 26. Computer Programming I ARPonix.com • Nonprocedural Languages (fourth generation) – Allows the user to specify the desired result without having to specify the detailed procedures needed for achieving the result Example: – database query language - SQL Can be used by non technical users • Natural Language Programming Languages (fifth generation (intelligent) languages) – Translates natural languages into a structured, machine- readable form – Are extremely complex and experimental Programming Languages
  • 27. Computer Programming I ARPonix.com • Object-Oriented Programming Languages (OOP) – based on objects – packaging data and the instructions about what to do with that data together – Examples: Java, C++ • Visual Programming Languages – Used within a graphical environment – Examples : Visual Basic and Visual C++ – Popular to non technical users. Current Programming Languages
  • 28. Computer Programming I ARPonix.com • Hypertext Markup Language (HTML) – standard language used in World Wide Web – contains text, images, and other types of information such as data files, audio, video, and executable computer programs • Extensible Markup Language (XML) – Improved on web document functionality • Virtual Reality Modeling Language (VRML) – a file format for describing three-dimensional (3D) interactive worlds and objects – can be used with the World Wide Web Current Programming Languages
  • 29. Computer Programming I ARPonix.com Compilers • Translate high-level language to machine language – Source code • The original program in a high level language – Object code • The translated version in machine language
  • 31. Computer Programming I ARPonix.com Linkers • Some programs we use are already compiled – Their object code is available for us to use – For example: Input and output routines • A Linker combines – The object code for the programs we write and – The object code for the pre-compiled routines into – The machine language program the CPU can run
  • 33. Computer Programming I ARPonix.com How are Programs Understood by the Computer? Program written in programming language (source code) Translator program  Assembler  Compiler  Interpreter Program written in machine language (object code) Processed By CPU  The Language Translation Process
  • 34. Computer Programming I ARPonix.com History Note • First programmable computer – Designed by Charles Babbage – Began work in 1822 – Not completed in Babbage’s life time • First programmer – Ada Augusta, Countess of Lovelace • Colleague of Babbage
  • 35. Computer Programming I ARPonix.com Resources • C++ Primer Plus. • Starting Out with C++. • Problem Solving with C++. • The C++ Programming Language. • My own experiences, specially about examples.