



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




CPS 196
Introduction to Programming: C
Lecture 1
Dr. Nancy McCracken
August 27, 2007
Developed at Bell Labs around 1969^ –
Emerged as the “winner” from a sequence of languages, including alanguage called “B”
-^
Originally created for systems programming, i.e. writingsoftware that controls hardware and other software.^ –
UNIX and other operating systems are written in C (+ machinecode)– So are many compilers, GUIs, device drivers, etc.
A distinguishing feature between C and other modern,popular programming languages is that it has an unusuallyrich set of operators that can be used to make the
programs
run very efficiently^ –
Includes operators that mimic machine language instructions, e.g. bitmanipulation instructions– Explicit memory management– Direct manipulation of addresses, or pointers
C is a good beginners language because the basicprogramming concepts can be learned with a minimum ofcomplex features
-^
Knowing C is a good step towards learning other languages
-^
You may have to read C programs, even if you don’t writethem
-^
It is still the high-level language of choice for systemsprogrammers^ –
supports writing fast, tight code with minimal space
-^
Many commercial tools and code libraries can be used mosteasily from C^ –
Much public domain code is available through open source andother projects
Write instructions in a high-level programming language,stored in the source file
-^
The compiler translates to computer instructions andcombines it with other library functions^ –
Libraries provide commonly useful functions such as I/O(input/output), mathematics, graphics, …
Computerinstructions
InputData
OutputResults
Source file
Library functions
programmer
compiler