Sie sind auf Seite 1von 17

.

ETE 132: Fundamentals of


Computer Programming


Welcome Everyone to the Computer
Programming ETE 132 Course
.
Course Information
Instructor: Mohammad Rashedur Rahman,
Assistant Professor, Ph.D. (Canada), M.Sc.
(Canada), B.Sc. in Engg. (BUET, CSE).
Office: Star Tower, 16
th
Floor.
Office Hours: Mon/Wed 04:10 6:10pm,
Sunday/Tuesday 11:10 am 1:10pm
Lab: There are computer labs twice a week
Information about Lab and Lab hours: TBA

.
Google and Me
.
My papers in DBLP
.
Text Book
C How to Program, Deitel & Deitel,
Prentice Hall, 4
th
/5
th
Edition
C: The Complete Reference, 4th.
Edition. Herbert Schildt, Tata
McGraw-Hill Publishing Company.

.
Mark Distribution (Approx.)
Class Attendance : 5%
Quiz : 15%
Lab: 20%
Midterm 1: 15%
Midterm 2: 15%
Final: 30% (Comprehensive)

.
Thanks to Deitel and Deitel
Generally the lecture slides are from
the book C-How To Program by
Deitel and Deitel
Special Thanks to the writers of the
book.

.
Chapter 1 Introduction to Computers
and C Programming
Outline
1.1 Introduction
1.2 What Is a Computer?
1.3 Computer Organization
1.4 Evolution of Operating Systems
1.5 Personal Computing, Distributed Computing and Client/Server
Computing
1.7 The History of C
1.8 Structured Programming
1.9 The Basics of a typical C Program Development Environment

.
1.1 Introduction
ETE 132 is introductory programming
course
for ETE students and
other students who have keen interest in problem
solving through computer programming
We will learn the C programming language
Learn structured programming and proper programming techniques
.
1.2 What is a Computer?

Computer
Device capable of performing computations and making logical
decisions
Computers process data under the control of sets of instructions
called computer programs

Hardware
Various devices comprising a computer
Keyboard, screen, mouse, disks, memory, CD-ROM, and
processing units

Software
Programs that run on a computer

.
1.3 Computer Organization
Six logical units in every computer:
1. Input unit
Obtains information from input devices (keyboard, mouse)
2. Output unit
Outputs information (to screen, to printer, to control other devices)
3. Memory unit
Rapid access, low capacity, stores input information
4. Arithmetic and logic unit (ALU)
Performs arithmetic calculations and logic decisions
5. Central processing unit (CPU)
Supervises and coordinates the other sections of the computer
6. Secondary storage unit
Cheap, long-term, high-capacity storage, stores inactive programs
.
1.4 Evolution of Operating Systems

Batch processing
Do only one job or task at a time
Users submit their jobs on decks of punched cards
Users often had to wait hours or even days before printouts returned to their desks

Operating systems
Help make it more convenient
Manage transitions between jobs
Increased throughput - amount of work computers process

Multiprogramming
Single user batch-processing rarely uses resources
Many jobs or tasks sharing the computer resources

Timesharing
Users access the computers through terminals, typically devices with keyboards
and screens.
Runs a small portion of one users job then moves on to service the next user
Computer does it so quickly that it may provide service to each user several times
per second.
.
1.5 Personal Computing, Distributed
Computing, and Client/Server Computing

Personal computers
In 1981, IBM, the worlds largest computer vendor
introduced the IBM personal computer.
Economical enough for individual
Distributed computing
Standalone Personal Computer could be linked
through computer networks, sometimes over
telephone line and sometimes local area networks
(LAN)
Client/server computing
Sharing of information across computer networks
between file servers and clients (personal computers)
.
1.6 Machine Languages, Assembly
Languages, and High-level Languages
Three types of programming languages
1. Machine languages (natural language to machines)
Strings of numbers giving machine specific instructions
Example:
+1300042774
+1400593419
+1200274027
It is cumbersome for human, slow and tedious for most
programmers.
2. Assembly languages
English-like abbreviations representing elementary computer
operations (translated via assemblers)
Example:
LOAD BASEPAY
ADD OVERPAY
STORE GROSSPAY


.
1.6 Machine Languages, Assembly
Languages, and High-level Languages (II)
3. High-level languages
Similar to everyday English and use mathematical notations
(translated via compilers)
Example:
grossPay = basePay + overTimePay


.
1.7 History of C
C
Evolved by Ritchie from two previous programming languages,
BCPL and B
Used to develop UNIX
Now, most operating systems written with C or C++
Hardware independent (portable)
By late 1970's C had evolved to "Traditional C"
Standardization
Many slight variations of C existed, and were in compatible
Committee formed to create a "unambiguous, machine-
independent" definition
Standard created in 1989, updated in 1999


.
1.8 Structured Programming

Structured programming
Disciplined approach to writing programs
Clear, easy to test and debug, and easy to modify

Das könnte Ihnen auch gefallen