M1 C Programming
M1 C Programming
Module 1: Introduction to C
Agenda
1 Introduction to C Programming
2
Introduction to C Programming
3
Objectives
4
Evolution ???
5
6
A very Small history
7
Nature of the C Language
From its evolution, it was natural for C to exhibit the powerful low-level
features of second generation languages like pointers, bit manipulation etc.
8
Nature of the C Language (Contd.).
Much of the Unix operating system has been written in the C language.
9
Block Structured Nature of C
C language offers only a handful of functions that form the core of the
language; rest of the functions, available as part of the language libraries, are
developed using the core functions, thus expanding the scope of the
language.
10
Block Structured Nature of C (Contd.).
11
The C Language: Features
12
The C Language: Features
13
The C Language: Features (Contd.).
Keywords: There are only 32 keywords, i.e., reserved words that cannot
be used as a variable declaration. The C99 has introduced five additional
keywords.
(inline, restrict, _Bool, _Complex and _Imaginary).
Library Functions: C is accompanied by a number of library functions to
carry out various commonly used operations. These functions are not part
of the language, but are supplied as a part of C compiler. Features which
tend to be computer-dependent are generally written as library functions.
14
The Hello World Program
15
Factored Code: An Example
16