SlideShare a Scribd company logo
CSC240
INTRODUCTION TO PROGRAMMING – I
Mr. Dilawar
Lecturer,
Department of Computer Science,
Jahan University
Kabul, Afghanistan.
Course Objectives
• After successfully completing this course, you will be able to:
• What is a computer system and how it works.
• Flow charts and Algorithms.
• Computer programming concepts and their implementation in C++ language.
Course Outline
• Introduction to Computer and Programming Languages.
• Elements of C++ Language.
• Control Structures.
• Working and Understanding Arrays.
• Working with Structures, Union and Enumeration.
Text Books to Follow
• Dietal & Dietal, C/C++: How to Program 7th Edition.
• Programming with C++ by CM Aslam & TA Qureshi (Aikmen Series).
• Object oriented programming using C++ by IT Series.
Lecture Outline
• Introduction to computers and computer organization
• Personal, Distributed and Client/Server Computing
• Programming languages
• Components of programming languages
• Programming techniques
Introduction to Computer
• An electronic machine that can perform computations and logical
decisions at a speed of millions and even billions of times faster than
human being.
• Processes data under control sets of instructions called program.
• A program is a set of instructions that is used to perform a specific
task.
• Programs are written by programmer.
• Programming Languages are the source through which a
programmer writes and develops computer programs.
Introduction to Computer
• Computers are comprised of two parts:
• Hardware-
• Software
Hardware
Electronics circuit boards
that provide
functionality of the system
Software
Program consists
of sets of instructions
that control the system
Computer Organization
Control Unit
Datapath
Arithmetic
Logic Unit
(ALU)
Registers
Processor (CPU)
Computer Organization
• Input Unit
• Receiving section of the computer.
• Gets data from various devices and places.
• Data is entered into computer with the help of mouse & keyboard.
• Data can also be entered in the form of voice and images via scanner and
microphone.
Computer Organization
• Output Unit
• Shaping section of the computer.
• Takes information from CPU and places it on various output devices.
• Information can be viewed either on screens or printed papers.
Computer Organization
• Memory Unit
• Short time warehouse section of computer.
• It keeps the data that has been entered so that it can be available for
processing.
• It also keeps the processed data so that information can be placed on output
devices by output unit.
Computer Organization
• Arithmetic & Logic Unit
• Manufacturing section of computer.
• It is responsible for calculations and logical operations.
• Calculation involves addition, subtraction, multiplication and division.
Computer Organization
• Control Unit
• Administrative section of computer.
• It supervises the operations of the other sections.
• It control and allocates jobs for all other units.
• Many of today’s computers have multiple CPUs and, hence, can perform
many operations simultaneously – multicore processors.
• Dual-core processors – Two CPU’s
• Quad-core processors – Four CPU’s
Computer Organization
• Registers
• Storage location in CPU, used to hold data or a memory address during the
execution of an instruction.
Computer Organization
• Secondary Unit
• Long time warehouse section of computer
• Program and data that are not actively used by the other units are normally
placed on secondary storage time.
• It stores the data permanently for future time.
• Non-Volatile Memory
Personal, Distributed and Client/Server
Computing
• Using desktop and laptop computers for personal use – Personal
computing.
• In 1977, Apple computer popularized Personal computing.
• In 1981, IBM the world’s largest computer vender, introduced the
IBM Personal Computer.
• Stand-alone – transported disks back and forth between them –
Sneakernet.
Personal, Distributed and Client/Server
Computing
• Machines could be linked together in computer networks, over
telephone lines in LANs that led to the phenomenon of distributed
computing.
• Distributed computing is a model in which components of a software
system are shared among multiple computers to improve efficiency
and performance.
Personal, Distributed and Client/Server
Computing
• In Client/Server computing:
• Servers provides services such as file servers, database servers, web servers
and etc…
• Client computers uses the services provided by the server.
Programming Languages
• A programming language is used to write computer programs.
• It is an artificial language designed to communicate instructions to a
machine.
• Some of them are directly understandable by computer and some of
them are needed to be converted first.
Programming Languages
• Computer languages are divided into three broad types:
• Machine Language
• Assembly Language
• High-Level Language
Programming Languages
• Machine Languages
• A computer understands machine language.
• Machine language is also called binary language.
• It is consist of two digits that instructs computers to perform their operations.
• They are machine-dependent.
• No translation is required – directly understandable by computer.
• They are hard to learn and understand.
Programming Languages
Programming Languages
• Assembly Language
• A language in which instead of binary codes we use English like abbreviations
(mnemonics) to represent the operations for the computer.
• A language that uses symbolic names to represent operations, registers and
memory locations.
• It uses a translator called Assembler.
Programming Languages
Programming Languages
• High-Level Language
• A language in which the instructions are written in the form of everyday
English and contain commonly used mathematical notations.
• Compiler and Interpreter are used to covert the high-level code to machine
code.
Programming Languages
Programming Languages
Hierarchy of Languages
Language Representations
Components of Programming Languages
• Syntax
• It is about the structure of the grammar of the language.
• In programming language, the rules and regulations for writing code are
called the syntax.
• A syntax can be used to construct a valid sentence/statement.
Components of Programming Languages
• Semantic
• It describes the meaning of the sentence.
• It describes that whether the sentence is correct or not. If so, what does the
sentence mean?
Categories of Programming Languages
• Major programming languages falls in the category of:
• Structured Programming Languages
• Modular Programming Languages
• Object-Oriented Programming Languages
Categories of Programming Languages
• Structured Programming Languages
• Languages in which the program is divided into smaller components –
functions.
• The structured programming contains three major concepts that are:
• Top-down Design / Divide and Conquer
• Code Reusability
• Information Hiding
Categories of Programming Languages
• Modular Programming Languages
• Languages in which the program is broken into individual components called
modules that can be programmed and tested independently.
Categories of Programming Languages
• Object-Oriented Programming Languages
• Languages in which object technology is supported.
• It allows the pieces of software to be reused and interchanged between
programs.
• The major concepts used in OOP are:
• Data Abstraction – Describes user defined datatypes.
• Encapsulation – Information Hiding
• Inheritance – Describes the reusability of a class.
• Polymorphism – Describes the ability to produce different results based on the object
that is sent to.
Summery
• Introduction to computers and computer organization
• Personal, distributed, and client/server computing
• Programming languages
• Components of programming languages
• Categories of programming languages
Thank You
For your Patience

More Related Content

What's hot

[HK Roni] C Programming Lectures
[HK Roni] C Programming Lectures[HK Roni] C Programming Lectures
[HK Roni] C Programming Lectures
MD. Hassanul Karim Roni
 
Introduction to computer programming
Introduction to computer programmingIntroduction to computer programming
Introduction to computer programmingNSU-Biliran Campus
 
6 input output devices
6 input output devices6 input output devices
6 input output devices
BaliThorat1
 
Computer Programming
Computer ProgrammingComputer Programming
Computer Programming
bhuttosalman
 
Introduction to Computers Lecture # 11
Introduction to Computers Lecture # 11Introduction to Computers Lecture # 11
Introduction to Computers Lecture # 11
Sehrish Rafiq
 
7 processor
7 processor7 processor
7 processor
BaliThorat1
 
INTRODUCTION TO COMPUTER SOFTWARE
INTRODUCTION TO COMPUTER SOFTWAREINTRODUCTION TO COMPUTER SOFTWARE
INTRODUCTION TO COMPUTER SOFTWARE
abiramiabi21
 
Computer generation and classification
Computer generation and classificationComputer generation and classification
Computer generation and classification
BaliThorat1
 
1 fundamentals of computer system
1 fundamentals of computer system1 fundamentals of computer system
1 fundamentals of computer system
BaliThorat1
 
1 fundamentals of computer
1 fundamentals of computer1 fundamentals of computer
1 fundamentals of computer
BaliThorat1
 
Introduction to Computers Lecture # 8
Introduction to Computers Lecture # 8Introduction to Computers Lecture # 8
Introduction to Computers Lecture # 8
Sehrish Rafiq
 
C++ Training - Lecture 01
C++ Training - Lecture 01C++ Training - Lecture 01
C++ Training - Lecture 01
Babak Farhang
 
8 operating system concept
8 operating system concept8 operating system concept
8 operating system concept
BaliThorat1
 
Software languages and devices
Software languages and devicesSoftware languages and devices
Software languages and devices
YogeshSorot
 
2. pl domain
2. pl domain2. pl domain
Computer Fundamentals & Intro to C Programming module i
Computer Fundamentals & Intro to C Programming module iComputer Fundamentals & Intro to C Programming module i
Computer Fundamentals & Intro to C Programming module i
Ajit Nayak
 
01 introduction zhu
01 introduction zhu01 introduction zhu
01 introduction zhuc09271
 
Unit 2 computer software
Unit 2 computer softwareUnit 2 computer software
Unit 2 computer software
Hardik Patel
 
Levels of programming languages
Levels of programming languagesLevels of programming languages
Levels of programming languages
MOHSIN BANGI
 
Lecture 4- Computer Software and Languages
Lecture 4- Computer Software and LanguagesLecture 4- Computer Software and Languages
Lecture 4- Computer Software and Languages
Md. Imran Hossain Showrov
 

What's hot (20)

[HK Roni] C Programming Lectures
[HK Roni] C Programming Lectures[HK Roni] C Programming Lectures
[HK Roni] C Programming Lectures
 
Introduction to computer programming
Introduction to computer programmingIntroduction to computer programming
Introduction to computer programming
 
6 input output devices
6 input output devices6 input output devices
6 input output devices
 
Computer Programming
Computer ProgrammingComputer Programming
Computer Programming
 
Introduction to Computers Lecture # 11
Introduction to Computers Lecture # 11Introduction to Computers Lecture # 11
Introduction to Computers Lecture # 11
 
7 processor
7 processor7 processor
7 processor
 
INTRODUCTION TO COMPUTER SOFTWARE
INTRODUCTION TO COMPUTER SOFTWAREINTRODUCTION TO COMPUTER SOFTWARE
INTRODUCTION TO COMPUTER SOFTWARE
 
Computer generation and classification
Computer generation and classificationComputer generation and classification
Computer generation and classification
 
1 fundamentals of computer system
1 fundamentals of computer system1 fundamentals of computer system
1 fundamentals of computer system
 
1 fundamentals of computer
1 fundamentals of computer1 fundamentals of computer
1 fundamentals of computer
 
Introduction to Computers Lecture # 8
Introduction to Computers Lecture # 8Introduction to Computers Lecture # 8
Introduction to Computers Lecture # 8
 
C++ Training - Lecture 01
C++ Training - Lecture 01C++ Training - Lecture 01
C++ Training - Lecture 01
 
8 operating system concept
8 operating system concept8 operating system concept
8 operating system concept
 
Software languages and devices
Software languages and devicesSoftware languages and devices
Software languages and devices
 
2. pl domain
2. pl domain2. pl domain
2. pl domain
 
Computer Fundamentals & Intro to C Programming module i
Computer Fundamentals & Intro to C Programming module iComputer Fundamentals & Intro to C Programming module i
Computer Fundamentals & Intro to C Programming module i
 
01 introduction zhu
01 introduction zhu01 introduction zhu
01 introduction zhu
 
Unit 2 computer software
Unit 2 computer softwareUnit 2 computer software
Unit 2 computer software
 
Levels of programming languages
Levels of programming languagesLevels of programming languages
Levels of programming languages
 
Lecture 4- Computer Software and Languages
Lecture 4- Computer Software and LanguagesLecture 4- Computer Software and Languages
Lecture 4- Computer Software and Languages
 

Viewers also liked

Mi visita a SeconLife
Mi visita a SeconLifeMi visita a SeconLife
Mi visita a SeconLife
Gabriel Amaiz
 
Makers University
Makers UniversityMakers University
Aula VHDL
Aula VHDLAula VHDL
Four Migration Options to Ease your SQL server 2005 End-of-Support Pains
Four Migration Options to Ease your SQL server 2005 End-of-Support PainsFour Migration Options to Ease your SQL server 2005 End-of-Support Pains
Four Migration Options to Ease your SQL server 2005 End-of-Support Pains
dinCloud Inc.
 
Engage - Επίλυση προβλήματος: Συμπεράσματα
Engage - Επίλυση προβλήματος: ΣυμπεράσματαEngage - Επίλυση προβλήματος: Συμπεράσματα
Engage - Επίλυση προβλήματος: Συμπεράσματα
George Androulakis
 
Bejaoui r., paquette g., basque j. et henri f. comment personnaliser l'appren...
Bejaoui r., paquette g., basque j. et henri f. comment personnaliser l'appren...Bejaoui r., paquette g., basque j. et henri f. comment personnaliser l'appren...
Bejaoui r., paquette g., basque j. et henri f. comment personnaliser l'appren...
Gilbert Paquette
 
Marketing plan - GetDone
Marketing plan - GetDoneMarketing plan - GetDone
Marketing plan - GetDone
Satvik Paramkusham
 
S sport oostkamp 2014
S sport oostkamp 2014S sport oostkamp 2014
S sport oostkamp 2014
kimpeellen
 
Physics Powerpoint
Physics PowerpointPhysics Powerpoint
Physics Powerpointksalina1
 
Conf.journée licef 2016
Conf.journée licef 2016Conf.journée licef 2016
Conf.journée licef 2016
Gilbert Paquette
 
Advertisement Samples - Interactive Bees
Advertisement Samples - Interactive BeesAdvertisement Samples - Interactive Bees
Advertisement Samples - Interactive Bees
Interactive Bees
 

Viewers also liked (17)

Bab iv
Bab ivBab iv
Bab iv
 
Mi visita a SeconLife
Mi visita a SeconLifeMi visita a SeconLife
Mi visita a SeconLife
 
Makers University
Makers UniversityMakers University
Makers University
 
Trabajo mercadeo oscar
Trabajo mercadeo oscarTrabajo mercadeo oscar
Trabajo mercadeo oscar
 
Aula VHDL
Aula VHDLAula VHDL
Aula VHDL
 
Four Migration Options to Ease your SQL server 2005 End-of-Support Pains
Four Migration Options to Ease your SQL server 2005 End-of-Support PainsFour Migration Options to Ease your SQL server 2005 End-of-Support Pains
Four Migration Options to Ease your SQL server 2005 End-of-Support Pains
 
Engage - Επίλυση προβλήματος: Συμπεράσματα
Engage - Επίλυση προβλήματος: ΣυμπεράσματαEngage - Επίλυση προβλήματος: Συμπεράσματα
Engage - Επίλυση προβλήματος: Συμπεράσματα
 
Bejaoui r., paquette g., basque j. et henri f. comment personnaliser l'appren...
Bejaoui r., paquette g., basque j. et henri f. comment personnaliser l'appren...Bejaoui r., paquette g., basque j. et henri f. comment personnaliser l'appren...
Bejaoui r., paquette g., basque j. et henri f. comment personnaliser l'appren...
 
簡報1
簡報1簡報1
簡報1
 
Si 1
Si 1Si 1
Si 1
 
Marketing plan - GetDone
Marketing plan - GetDoneMarketing plan - GetDone
Marketing plan - GetDone
 
Sectores economicos jaime
Sectores economicos jaime Sectores economicos jaime
Sectores economicos jaime
 
S sport oostkamp 2014
S sport oostkamp 2014S sport oostkamp 2014
S sport oostkamp 2014
 
Physics Powerpoint
Physics PowerpointPhysics Powerpoint
Physics Powerpoint
 
Pre production
Pre productionPre production
Pre production
 
Conf.journée licef 2016
Conf.journée licef 2016Conf.journée licef 2016
Conf.journée licef 2016
 
Advertisement Samples - Interactive Bees
Advertisement Samples - Interactive BeesAdvertisement Samples - Interactive Bees
Advertisement Samples - Interactive Bees
 

Similar to Csc240 lecture 1

Python-unit -I.pptx
Python-unit -I.pptxPython-unit -I.pptx
Python-unit -I.pptx
crAmth
 
Problem Solving and Program Design in C_1.pdf
Problem Solving and Program Design in C_1.pdfProblem Solving and Program Design in C_1.pdf
Problem Solving and Program Design in C_1.pdf
jlu08167
 
Programming requirements for beginning in software engineering.pptx
Programming requirements for beginning in software engineering.pptxProgramming requirements for beginning in software engineering.pptx
Programming requirements for beginning in software engineering.pptx
TeddyDaka
 
Desired language characteristics – Data typing .pptx
Desired language characteristics – Data typing .pptxDesired language characteristics – Data typing .pptx
Desired language characteristics – Data typing .pptx
4132lenin6497ram
 
Ahmadalsawad
AhmadalsawadAhmadalsawad
Ahmadalsawad
ahmadalsawad
 
sege.pdf
sege.pdfsege.pdf
sege.pdf
SegezzBrian
 
Introduction to computer programming
Introduction to computer programming Introduction to computer programming
Introduction to computer programming
VanessaBuensalida
 
Program Logic and Design
Program Logic and DesignProgram Logic and Design
Program Logic and Design
Froilan Cantillo
 
programming.pptx
programming.pptxprogramming.pptx
programming.pptx
DarianElmyra
 
SYSTEM SOFTWARE
SYSTEM SOFTWARE SYSTEM SOFTWARE
SYSTEM SOFTWARE
Hunny Jummani
 
Programming for Problem Solving
Programming for Problem SolvingProgramming for Problem Solving
Programming for Problem Solving
Sukhendra Singh
 
lec 1.pptx
lec 1.pptxlec 1.pptx
lec 1.pptx
AhsanAli64749
 
Mca i-fundamental of computer-u-2- application and system software
Mca  i-fundamental of  computer-u-2- application and system softwareMca  i-fundamental of  computer-u-2- application and system software
Mca i-fundamental of computer-u-2- application and system software
Rai University
 
a1.pptx.pdf
a1.pptx.pdfa1.pptx.pdf
a1.pptx.pdf
Sheham Hassan
 
Compilers.pptx
Compilers.pptxCompilers.pptx
Compilers.pptx
MohammedMohammed578197
 
Bca i-fundamental of computer-u-2- application and system software
Bca  i-fundamental of  computer-u-2- application and system softwareBca  i-fundamental of  computer-u-2- application and system software
Bca i-fundamental of computer-u-2- application and system software
Rai University
 
Introduction to computer programming
Introduction to computer programmingIntroduction to computer programming
Introduction to computer programming
Sangheethaa Sukumaran
 
Bsc cs 1 fit u-2 application and system software
Bsc cs 1 fit u-2 application and system softwareBsc cs 1 fit u-2 application and system software
Bsc cs 1 fit u-2 application and system software
Rai University
 
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
Rai University
 
Embedded c c++ programming fundamentals master
Embedded c c++ programming fundamentals masterEmbedded c c++ programming fundamentals master
Embedded c c++ programming fundamentals master
Hossam Hassan
 

Similar to Csc240 lecture 1 (20)

Python-unit -I.pptx
Python-unit -I.pptxPython-unit -I.pptx
Python-unit -I.pptx
 
Problem Solving and Program Design in C_1.pdf
Problem Solving and Program Design in C_1.pdfProblem Solving and Program Design in C_1.pdf
Problem Solving and Program Design in C_1.pdf
 
Programming requirements for beginning in software engineering.pptx
Programming requirements for beginning in software engineering.pptxProgramming requirements for beginning in software engineering.pptx
Programming requirements for beginning in software engineering.pptx
 
Desired language characteristics – Data typing .pptx
Desired language characteristics – Data typing .pptxDesired language characteristics – Data typing .pptx
Desired language characteristics – Data typing .pptx
 
Ahmadalsawad
AhmadalsawadAhmadalsawad
Ahmadalsawad
 
sege.pdf
sege.pdfsege.pdf
sege.pdf
 
Introduction to computer programming
Introduction to computer programming Introduction to computer programming
Introduction to computer programming
 
Program Logic and Design
Program Logic and DesignProgram Logic and Design
Program Logic and Design
 
programming.pptx
programming.pptxprogramming.pptx
programming.pptx
 
SYSTEM SOFTWARE
SYSTEM SOFTWARE SYSTEM SOFTWARE
SYSTEM SOFTWARE
 
Programming for Problem Solving
Programming for Problem SolvingProgramming for Problem Solving
Programming for Problem Solving
 
lec 1.pptx
lec 1.pptxlec 1.pptx
lec 1.pptx
 
Mca i-fundamental of computer-u-2- application and system software
Mca  i-fundamental of  computer-u-2- application and system softwareMca  i-fundamental of  computer-u-2- application and system software
Mca i-fundamental of computer-u-2- application and system software
 
a1.pptx.pdf
a1.pptx.pdfa1.pptx.pdf
a1.pptx.pdf
 
Compilers.pptx
Compilers.pptxCompilers.pptx
Compilers.pptx
 
Bca i-fundamental of computer-u-2- application and system software
Bca  i-fundamental of  computer-u-2- application and system softwareBca  i-fundamental of  computer-u-2- application and system software
Bca i-fundamental of computer-u-2- application and system software
 
Introduction to computer programming
Introduction to computer programmingIntroduction to computer programming
Introduction to computer programming
 
Bsc cs 1 fit u-2 application and system software
Bsc cs 1 fit u-2 application and system softwareBsc cs 1 fit u-2 application and system software
Bsc cs 1 fit u-2 application and system software
 
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
 
Embedded c c++ programming fundamentals master
Embedded c c++ programming fundamentals masterEmbedded c c++ programming fundamentals master
Embedded c c++ programming fundamentals master
 

More from Ainuddin Yousufzai

Chapter04 ip addressing networking
Chapter04 ip addressing networkingChapter04 ip addressing networking
Chapter04 ip addressing networking
Ainuddin Yousufzai
 
Chapter 02 topology networking
Chapter 02  topology networkingChapter 02  topology networking
Chapter 02 topology networking
Ainuddin Yousufzai
 
Chapter 01 networking
Chapter 01 networkingChapter 01 networking
Chapter 01 networking
Ainuddin Yousufzai
 
Chapter08 internet & multimedia (b)
Chapter08   internet & multimedia (b)Chapter08   internet & multimedia (b)
Chapter08 internet & multimedia (b)
Ainuddin Yousufzai
 
Chapter08 internet & multimedia (a)
Chapter08   internet & multimedia (a)Chapter08   internet & multimedia (a)
Chapter08 internet & multimedia (a)
Ainuddin Yousufzai
 
Chapter07 io devices
Chapter07   io devicesChapter07   io devices
Chapter07 io devices
Ainuddin Yousufzai
 
Chapter06 computer software
Chapter06   computer softwareChapter06   computer software
Chapter06 computer software
Ainuddin Yousufzai
 
Chapter05 secondary storage
Chapter05   secondary storageChapter05   secondary storage
Chapter05 secondary storage
Ainuddin Yousufzai
 
Chapter04 processor and memory
Chapter04   processor and memoryChapter04   processor and memory
Chapter04 processor and memory
Ainuddin Yousufzai
 
Chapter03 number system
Chapter03   number systemChapter03   number system
Chapter03 number system
Ainuddin Yousufzai
 
Chapter02 basic computer organization
Chapter02   basic computer organizationChapter02   basic computer organization
Chapter02 basic computer organization
Ainuddin Yousufzai
 
Chapter01 introduction to computer
Chapter01   introduction to computerChapter01   introduction to computer
Chapter01 introduction to computer
Ainuddin Yousufzai
 
Csc240 -lecture_5
Csc240  -lecture_5Csc240  -lecture_5
Csc240 -lecture_5
Ainuddin Yousufzai
 
Csc240 -lecture_4
Csc240  -lecture_4Csc240  -lecture_4
Csc240 -lecture_4
Ainuddin Yousufzai
 
Csc240 -lecture_3
Csc240  -lecture_3Csc240  -lecture_3
Csc240 -lecture_3
Ainuddin Yousufzai
 
Csc240 -lecture_2
Csc240  -lecture_2Csc240  -lecture_2
Csc240 -lecture_2
Ainuddin Yousufzai
 

More from Ainuddin Yousufzai (16)

Chapter04 ip addressing networking
Chapter04 ip addressing networkingChapter04 ip addressing networking
Chapter04 ip addressing networking
 
Chapter 02 topology networking
Chapter 02  topology networkingChapter 02  topology networking
Chapter 02 topology networking
 
Chapter 01 networking
Chapter 01 networkingChapter 01 networking
Chapter 01 networking
 
Chapter08 internet & multimedia (b)
Chapter08   internet & multimedia (b)Chapter08   internet & multimedia (b)
Chapter08 internet & multimedia (b)
 
Chapter08 internet & multimedia (a)
Chapter08   internet & multimedia (a)Chapter08   internet & multimedia (a)
Chapter08 internet & multimedia (a)
 
Chapter07 io devices
Chapter07   io devicesChapter07   io devices
Chapter07 io devices
 
Chapter06 computer software
Chapter06   computer softwareChapter06   computer software
Chapter06 computer software
 
Chapter05 secondary storage
Chapter05   secondary storageChapter05   secondary storage
Chapter05 secondary storage
 
Chapter04 processor and memory
Chapter04   processor and memoryChapter04   processor and memory
Chapter04 processor and memory
 
Chapter03 number system
Chapter03   number systemChapter03   number system
Chapter03 number system
 
Chapter02 basic computer organization
Chapter02   basic computer organizationChapter02   basic computer organization
Chapter02 basic computer organization
 
Chapter01 introduction to computer
Chapter01   introduction to computerChapter01   introduction to computer
Chapter01 introduction to computer
 
Csc240 -lecture_5
Csc240  -lecture_5Csc240  -lecture_5
Csc240 -lecture_5
 
Csc240 -lecture_4
Csc240  -lecture_4Csc240  -lecture_4
Csc240 -lecture_4
 
Csc240 -lecture_3
Csc240  -lecture_3Csc240  -lecture_3
Csc240 -lecture_3
 
Csc240 -lecture_2
Csc240  -lecture_2Csc240  -lecture_2
Csc240 -lecture_2
 

Recently uploaded

Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Po-Chuan Chen
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 

Recently uploaded (20)

Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 

Csc240 lecture 1

  • 1. CSC240 INTRODUCTION TO PROGRAMMING – I Mr. Dilawar Lecturer, Department of Computer Science, Jahan University Kabul, Afghanistan.
  • 2. Course Objectives • After successfully completing this course, you will be able to: • What is a computer system and how it works. • Flow charts and Algorithms. • Computer programming concepts and their implementation in C++ language.
  • 3. Course Outline • Introduction to Computer and Programming Languages. • Elements of C++ Language. • Control Structures. • Working and Understanding Arrays. • Working with Structures, Union and Enumeration.
  • 4. Text Books to Follow • Dietal & Dietal, C/C++: How to Program 7th Edition. • Programming with C++ by CM Aslam & TA Qureshi (Aikmen Series). • Object oriented programming using C++ by IT Series.
  • 5. Lecture Outline • Introduction to computers and computer organization • Personal, Distributed and Client/Server Computing • Programming languages • Components of programming languages • Programming techniques
  • 6. Introduction to Computer • An electronic machine that can perform computations and logical decisions at a speed of millions and even billions of times faster than human being. • Processes data under control sets of instructions called program. • A program is a set of instructions that is used to perform a specific task. • Programs are written by programmer. • Programming Languages are the source through which a programmer writes and develops computer programs.
  • 7. Introduction to Computer • Computers are comprised of two parts: • Hardware- • Software Hardware Electronics circuit boards that provide functionality of the system Software Program consists of sets of instructions that control the system
  • 9. Computer Organization • Input Unit • Receiving section of the computer. • Gets data from various devices and places. • Data is entered into computer with the help of mouse & keyboard. • Data can also be entered in the form of voice and images via scanner and microphone.
  • 10. Computer Organization • Output Unit • Shaping section of the computer. • Takes information from CPU and places it on various output devices. • Information can be viewed either on screens or printed papers.
  • 11. Computer Organization • Memory Unit • Short time warehouse section of computer. • It keeps the data that has been entered so that it can be available for processing. • It also keeps the processed data so that information can be placed on output devices by output unit.
  • 12. Computer Organization • Arithmetic & Logic Unit • Manufacturing section of computer. • It is responsible for calculations and logical operations. • Calculation involves addition, subtraction, multiplication and division.
  • 13. Computer Organization • Control Unit • Administrative section of computer. • It supervises the operations of the other sections. • It control and allocates jobs for all other units. • Many of today’s computers have multiple CPUs and, hence, can perform many operations simultaneously – multicore processors. • Dual-core processors – Two CPU’s • Quad-core processors – Four CPU’s
  • 14. Computer Organization • Registers • Storage location in CPU, used to hold data or a memory address during the execution of an instruction.
  • 15. Computer Organization • Secondary Unit • Long time warehouse section of computer • Program and data that are not actively used by the other units are normally placed on secondary storage time. • It stores the data permanently for future time. • Non-Volatile Memory
  • 16. Personal, Distributed and Client/Server Computing • Using desktop and laptop computers for personal use – Personal computing. • In 1977, Apple computer popularized Personal computing. • In 1981, IBM the world’s largest computer vender, introduced the IBM Personal Computer. • Stand-alone – transported disks back and forth between them – Sneakernet.
  • 17. Personal, Distributed and Client/Server Computing • Machines could be linked together in computer networks, over telephone lines in LANs that led to the phenomenon of distributed computing. • Distributed computing is a model in which components of a software system are shared among multiple computers to improve efficiency and performance.
  • 18. Personal, Distributed and Client/Server Computing • In Client/Server computing: • Servers provides services such as file servers, database servers, web servers and etc… • Client computers uses the services provided by the server.
  • 19. Programming Languages • A programming language is used to write computer programs. • It is an artificial language designed to communicate instructions to a machine. • Some of them are directly understandable by computer and some of them are needed to be converted first.
  • 20. Programming Languages • Computer languages are divided into three broad types: • Machine Language • Assembly Language • High-Level Language
  • 21. Programming Languages • Machine Languages • A computer understands machine language. • Machine language is also called binary language. • It is consist of two digits that instructs computers to perform their operations. • They are machine-dependent. • No translation is required – directly understandable by computer. • They are hard to learn and understand.
  • 23. Programming Languages • Assembly Language • A language in which instead of binary codes we use English like abbreviations (mnemonics) to represent the operations for the computer. • A language that uses symbolic names to represent operations, registers and memory locations. • It uses a translator called Assembler.
  • 25. Programming Languages • High-Level Language • A language in which the instructions are written in the form of everyday English and contain commonly used mathematical notations. • Compiler and Interpreter are used to covert the high-level code to machine code.
  • 27. Programming Languages Hierarchy of Languages Language Representations
  • 28. Components of Programming Languages • Syntax • It is about the structure of the grammar of the language. • In programming language, the rules and regulations for writing code are called the syntax. • A syntax can be used to construct a valid sentence/statement.
  • 29. Components of Programming Languages • Semantic • It describes the meaning of the sentence. • It describes that whether the sentence is correct or not. If so, what does the sentence mean?
  • 30. Categories of Programming Languages • Major programming languages falls in the category of: • Structured Programming Languages • Modular Programming Languages • Object-Oriented Programming Languages
  • 31. Categories of Programming Languages • Structured Programming Languages • Languages in which the program is divided into smaller components – functions. • The structured programming contains three major concepts that are: • Top-down Design / Divide and Conquer • Code Reusability • Information Hiding
  • 32. Categories of Programming Languages • Modular Programming Languages • Languages in which the program is broken into individual components called modules that can be programmed and tested independently.
  • 33. Categories of Programming Languages • Object-Oriented Programming Languages • Languages in which object technology is supported. • It allows the pieces of software to be reused and interchanged between programs. • The major concepts used in OOP are: • Data Abstraction – Describes user defined datatypes. • Encapsulation – Information Hiding • Inheritance – Describes the reusability of a class. • Polymorphism – Describes the ability to produce different results based on the object that is sent to.
  • 34. Summery • Introduction to computers and computer organization • Personal, distributed, and client/server computing • Programming languages • Components of programming languages • Categories of programming languages
  • 35. Thank You For your Patience