CSC – 183 Programming C
Chapter – 1
Overview of C
2
Introduction to Programming
What is a program?
A computer program is a set of instructions that tell a
computer what to do.
3
Introduction to Programming
What is a programming Language?
A programming language is a formal computer language designed
to communicate and give instructions to a machine, particularly a
computer.
4
Programming C:
C is a high-level and general purpose
programming language.
5
History of C
✔The root of all modern languages is ALGOL, introduced in
1960s.
✔In 1967, Martin Rachards developed BCPL- Basic Combined
Programming Language.
✔In 1970, Ken Thompson created B by using BCPL features.
✔In 1972, C was evolved from ALGOL, BCPL and B by
Dennis Ritchie at the Bell Laboratories on DEC PDP-11 machine.
Which referred as "Traditional C“.
✔In 1978, introduced K&R C (Kerningham and Dennis
Ritchie).
✔In 1989, ANSI approved a version of C known as ANSI C.
6
History of C
7
Importance of C
✔C is small (only 32 keywords).
✔C has rich set of built-in functions and support variety of data types
& operators.
✔C is highly portable (Machine independent).
✔C is structured.
✔C has ability to extend itself.
✔C is stable (the language doesn’t change much).
✔C is quick running (code written in c is efficient & fast).
✔C is the basis for many other
✔C is a Programmers Language.
✔It may not feel like it but C is one of the easiest language to learn.
8
What is C used for?
C is most likely an evergreen language.
Initially, C widely known as the development language of the
UNIX operating system but today virtually all new major operating
systems are written in C and/or C++.
✔Systems programming: OSes, like Linux.
✔Microcontrollers: Automobiles and Airplanes.
✔Embedded processors: Phones, Portable Electronics etc.
✔DSP processors: Digital Audio.
9
Structure of C program
10
Programming Style
✔You should follow one style for programming
✔We must develop the habit of writing programs in lowercase letters,
because C programs statements are written in lowercase letters
✔Uppercase letters are used only for symbolic constants
✔Braces,{} indicates beginning and end of a functions
✔Need, braces to align for easy readability
✔write one statement into one line, although C support multiple
statement in a single line
11
Process for Executing A ‘C’ Program
Edit
Executing a program written in C
Program
involves a series of steps. There
Source are:
Code
✔ Creating the program
✔ Compiling it
Compile ✔ Linking the program
with functions that are
Object needed from the C
Code library
✔ Executing the program
Library Link Object
Files Code Executable
CSC-183 9 May 2022 11