Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to C Programming Language. History of C  C was evolved by Dennis Ritchie at AT&T Bell Laboratories in early of 1970s  Successor of: ALGOL.

Similar presentations


Presentation on theme: "Introduction to C Programming Language. History of C  C was evolved by Dennis Ritchie at AT&T Bell Laboratories in early of 1970s  Successor of: ALGOL."— Presentation transcript:

1 Introduction to C Programming Language

2 History of C  C was evolved by Dennis Ritchie at AT&T Bell Laboratories in early of 1970s  Successor of: ALGOL 60 (1960), CPL (Cambridge, 1963), BCPL (Martin Richard, 1967), B (Ken Thompson, 1970)  Used to develop UNIX.  Traditional C:  The C Programming Language, by Brian Kernighan and Dennis Ritchie, 2nd Edition, Prentice Hall. K&R

3 Standardization  Since it was developed for UNIX, so it was incompatible with any OS or hardware. So need to create an “unambiguous, machine-independent" definition.  ANSI (American National Standards Institute) created standard in 1989.  That standard was updated in 1995 (C95) and finally in 1999 (C99). C++ &C: C++ extends C to include support for Object Oriented programming and other features that facilitate large software development projects. Because C++ includes C, it is best to master C, then learn C++.

4 Characteristics of C C has now become a widely used professional language for various reasons :  Structured language  General purpose programming language  It can handle low-level activities. (hardware programming)  Machine independent.  Has fast speed execution.

5 Uses of C C was designed as a system development language because it produces code that runs as fast as the code written in assembly language. Some examples of the use of C might be:  Operating Systems  Assemblers  Language Compilers  Language Interpreters  Text Editors  Network Drivers  Databases  Utilities

6 C Standard Library  C programs consist of pieces/modules called functions.  C provides a set of functions stored in a set of files known as the standard library.  Programmers will often use the C library functions as building blocks.  A programmer can create his own functions. Advantage: the programmer knows exactly how it works Disadvantage: time consuming

7 Typical C development Environment Phases of C Program: 1.Edit 2.Preprocess 3.Compile 4.Link 5.Load & Execute(Run) Loader Primary Memory Program is created in the editor and stored on disk. Preprocessor program processes the code. Loader puts program in memory. CPU takes each instruction and executes it, possibly storing new data values as the program executes. Compiler Compiler creates object code and stores it on disk. Linker links the object code with the libraries, creates a.out and stores it on disk Editor Preprocessor Linker CPU Primary Memory........................ Disk


Download ppt "Introduction to C Programming Language. History of C  C was evolved by Dennis Ritchie at AT&T Bell Laboratories in early of 1970s  Successor of: ALGOL."

Similar presentations


Ads by Google