ch01 Introduction
ch01 Introduction
CHAPTER CONTENT
Introduction
History
Characteristics of the language
First Program
A simpleprogram and explanations
Examples
Exercises
HISTORY
Originally designed for and implemented on UNIX.
BCPL
(Martin Richards)
B
(Ken Thompson -1970)
UNIX PDP-7
C
(Dennis Ritchie &
Brian Kernighan -1978)
ANSI C
(1983 - 1988)
INTRODUCTION - CHARACTERISTICS
Small
C contains only the necessary minimum.It does not
supply any facilities…
We gain:
Efficiency (It is small and quick).
Portability (C is not tied to any particular hardware or system).
INTRODUCTION – CHARACTERISTICS –
CONT’D
Middle Level
Syntax of a high level language.
We gain:
Readability.
Portability.
BUT
Power of a low level language (assembly).
For example - a program written in C can manipulate
bits !
INTRODUCTION – CHARACTERISTICS –
CONT’D
You can write anything with C, For example :
Compilers.
Data bases.
Text processing.
Operating system.
Games.
} End of block.
EXPLANATIONS – CONT’D
printf() A library function for output to the
screen. The requested output is
specified in “ ”.
\n New line character.
; End of statement;
One of the C preprocessor directives.
#include The preprocessor will replace this line
with the file indicated.
Search for the file in the standard
< ... >
directories.
One of the C header files. It contains
stdio.h
declarations needed to perform I/O.
STAGES OF SOFTWARE DEVELOPMENT
Problem Algorithm
Coding
Definition Development
Debugging
Object File Compilation
Syntax
Debugging Executable
Linkage
Linkage File