Unit 1.2 Introduction To C
Unit 1.2 Introduction To C
of C Language
PRH
Computer Program
• A program is a set of instructions following the rules of the
chosen language.
• Without programs, computers are useless.
• It contains a list of ingredients (called variables) and a list of
directions (called statements) that tell the
computer what to do with the variables.
Lower Level
Middle Level
3. C Language
(History & Overview)
• Designed originally by Dennis Ritchie, working at AT&T BellLaboratories in
New Jersey, it has increased in use until now it may well be one of the most
widely-written computer languages in the world.
• C is a structured language.
• It allows variety of programs in small modules.
• It is easy for debugging, testing, and maintenance if a language is a
structure done.
• 'C' was developed by Dennis Ritchie in 1972.
• It is a robust language.
• It is a procedure and structure oriented language.
• It has the full support of various operating systems and hardware
platforms.
• Many compilers are available for executing programs written in 'C'.
• A compiler compiles the source file and generates an object file.
• A linker links all the object files together and creates one executable
file.
• It is highly portable.
4. STRUCTURE OF A C PROGRAM
Features of C
• ‘C’ is a general purpose structure language- the instruction consist of algebric
expression supported with English keywords such as if, else, for, goto,
continue, break,etc.
• ‘C’ is programming language – it is simple to implement and highly effective.
• ‘C’ is compatible language- it can run on all machines right from 8088 to
recent machines
• ‘C’ has reach set of built- in functions.
• ‘C’ provides a variety of data types operators and functions which makes it’s
code highly efficient and fast.
• ‘C’ supports pointers which can directly access the adress of a variable in the
computer’s memory.
• ‘C’ has only 32 keywords.
• ‘C’ is middle level language – It provide high level programming supports as
well as low level programming supports that means assembly language
programming.
• ‘C’ provides dynamic allocation of memory- This allows to allocate memory
during runtime.
• ‘C’ Provides Modular programming – It is a logical collection of one or more
functions or modules.
• ‘C’ is extensible – it continuously adds the library functions supported by the C
library
5