Introduction to C Language
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
229
On Slideshare
228
From Embeds
1
Number of Embeds
1

Actions

Shares
Downloads
16
Comments
0
Likes
0

Embeds 1

http://www.slideee.com 1

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. 1. INTRODUCTION TO C LANGUAGE 2. ADVANTAGES OF C LANGUAGES 3. STRUCTURE OF C PROGRAM 4. WRITING AND COMPILING C PROGRAM Introduction to C Language
  • 2. Introduction to C Language  The C programming language was designed by Dennis Ritchie at Bell Laboratories in the early 1970s  It was influenced by the following programming languages:  ALGOL 60 (1960),  CPL (Cambridge, 1963),  BCPL (Martin Richard, 1967),  B (Ken Thompson, 1970)
  • 3. Advantages Of C  Modularity  General Purpose Programming Language  Middle Level Language  Portability  Speed Of Compilation
  • 4. Disadvantages Of C  Lack of OOP features  No Namespace features  No concept of constructor and destructor
  • 5. Interpretation  Interpretation and compilation are different ways of translating high-level languages.  Interpreter is program that executes program statements  Generally execute one line/command at a time  Limited processing power  Easy to debug, make changes, view intermediate results  Languages: BASIC, LISP, Perl, Matlab, C-shell
  • 6. Compilation  Translates statements into machine language  Does not execute, but creates executable program  Change requires recompilation  Languages: C, C++, Fortran, Pascal
  • 7. Structure Of C Program
  • 8. Documentation: o Name of the programmer o Other detail about the program which the programmer think can be useful later Preprocessor Statements: o Begins with # sign. o Command to include header files or symbolic constant before compiling the program
  • 9. Global Declarations: Declaration of function or the global variables. Main Function: Execution starts from here
  • 10. Compiling C Program  Preprocessing: Read source code and evaluate preprocessor part.  Compiling: Convert source code to assembly code  Assembling: Create object code.  Linking: Link above object code files and other library files to produce one complete executable file.
  • 11. Compiling C Program
  • 12. Sample C Program
  • 13. Compiling C Program
  • 14. Unsuccessful Compilation
  • 15. List of Errors
  • 16. Successful Compilation
  • 17. Running the Program
  • 18. Output