Lecture 1
Fundamentals of Computer
Programming
Jehangir Arshad Meo
Mechanical Engineering Department
COMSATS Institute of Information and Technology
Text Books:
Name: “C How to program”
Authors: Paul Deitel and Harvey Deitel
Grading Policy:
Quizzes 15%
Assignments 10%
Sessional I 10%
Sessional II 15%
Final Exam 50%
Total Marks = Sessionals + Assignment/Quizzes + Final
Total Marks = 25 + 25 + 50 = 100
Course outline:
Computer, Computer Architecture, Computer components
software, hardware.
Components of a microcomputer, CPU structure and function, Types of software.
Introduction to languages, Languages history, Language types and level.
Basic data types, Keywords, pseudo code and flowcharts.
Operations, Expression, Assignment sequence.
Program control if and else statements.
For, while and do while loops.
Switch statements, Compound statements, Functions and Parameters.
Arrays declaration, Array passing to functions, String, Strings manipulating, pointers.
So Lets start the Course…….
Computer?????????
What is a Computer??
Computers are electronic devices that can
follow instructions to:
◦ Accept input
◦ Process that input
◦ Produce information
Alternatively, a computer is a device capable of
performing calculations and making logical
decisions at speeds millions, and even billions,
of times faster than human beings can.
What is a Computer??
For example
◦ Personal Computers can perform tens of millions of
additions per second.
◦ A person operating a desk calculator might require decades
to complete the same number of calculations a powerful
personal computer can perform in one second.
◦ Supercomputers can perform hundreds of billions of
additions per second.
◦ And trillions-instructions per second computer are already
functioning in research laboratories.
What is Computer
Basics of Computer Organization:
A Typical Computer System
Monitor
Speaker
(output)
(output)
System unit
(processor, memory…)
Printer
(output)
Storage devices
(CD-RW, Floppy,
Hard disk, zip,…)
Scanner
(input) Keyboard Mouse
(input) (input)
What does a Computer Do?
Computers can perform four general
operations, which comprise the information
processing cycle.
Input
◦ Keyboard, Mouse, Scanner, Network/Internet, Cell phones
etc
Process
◦ Software
Output
◦ Monitor, Printer etc
Storage
◦ RAM, Hard disk, Floppy Disk, CD/DVD, Flash Disk etc
Data vs. Information
Data is a collection of raw facts, figures and
symbols, such as numbers, words, images,
video and sound.
Information is data that is organized,
meaningful, and useful.
Computer takes data as input and process it to
form information
Software vs. Hardware
A computer is an electronic device, operating
under the control of instructions (software)
Instructions are stored in its computer’s own
memory unit.
Hardware is Tangible
How Does a Computer Know what to
do?
A detailed list of instructions called a Computer
Program or Software tells computer exactly what
to do.
Before processing a specific job, the computer
program corresponding to that job must be stored
in memory (RAM).
Once the program is stored in memory the
computer can start the operation by executing the
program instructions one after the other.
Storage Devices
RAM (Random Access Memory)
◦ Memory also called Random Access Memory or RAM
(temporary memory) is the main memory of the computer.
◦ Data in the RAM is lost when you turned off your computer.
ROM (Read Only Memory)
◦ ROM can store information a much larger in size than RAM.
◦ Slower than RAM.
Other Storage Devices
Post Class Activity
Find the differences between
◦ Hardware and Software
◦ Data and Information
◦ ROM and RAM