01 Introduction To C Programming Language
01 Introduction To C Programming Language
"#$%&"'()
*+$&,-%#$.,+'$,'/'
0&,1&233.+1'!2+1%21"
!"#$%&'(#)*'+,
-./01)2-34
Origins of C
2
Origins of C (cont.)
• By 1971, Ritchie began to develop
an extended version of B.
• He called his language NB (“New
B”) at first.
• As the language began to diverge
more from B, he changed its name
to C.
• The language was stable enough
by 1973 that UNIX could be
rewritten in C.
3
Standardization of C
• K&R C
• The C Programming Language (1978) (written by
Kernighan and Ritchie)
• De facto standard
ISO/IEC Documents
• C89/C90
ISO/IEC 9899:1990
• ANSI standard X3.159-1989 ISO/IEC 9899:1990/Amd 1:1995
ISO/IEC 9899:1990/Cor 1:1994
Brian Kernighan
• ISO/IEC 9899:1990 ISO/IEC 9899:1990/Cor 2:1996
(1942- )
ISO/IEC 9899:1999
• C99 ISO/IEC 9899:1999/Cor 1:2001
ISO/IEC 9899:1999/Cor 2:2004
• C11 Features taught in this course ISO/IEC 9899:1999/Cor 3:2007
are introduced/defined in C99.
ISO/IEC 9899:2011
• C18 ISO/IEC 9899:2011/Cor 1:2012
ISO/IEC 9899:2018
4
C-Based Languages
• Low-level
• Small
• Permissive
6
Strengths of C
• Efficiency (low-level)
• Flexibility (small and permissive)
• C imposes very few restrictions on the use of its features.
• Integration with UNIX
• Portability
• C compilers are small and easily written.
• Power
• C has large collection of data types and operators.
• Standard library
7
Weaknesses of C
8
Effective Use of C
9
If you are bored with learning basic C skills…
Take a look at the
IOCCC website to see
how obfuscating C can
be!
10
Source:http://www.ioccc.org/1986/holloway/holloway.c
IOCCC 1986/holloway
It just prints “Hello, world!”
11
They both print out the p value.
Source:http://www.ioccc.org/1989/roemer.c
Source:http://www.ioccc.org/1988/westley.c
12
IOCCC 1998/banks
It is a flight simulator in
1536 bytes! (X11 needed)
Source:http://www.ioccc.org/1998/banks.c
13
Source:https://www.tiobe.com/tiobe-index/
14
Source:https://www.tiobe.com/tiobe-index/
15