Introduction to the C language


Introduction to the C language 



Sample of the pdf document :




The C language - history:

• Late ‘60s: MIT, GE, and Bell Labs partner up to build MULTICS, to provide
computational power on a grid, just like electrical power, using the B
programming language

• Early ’70s: from B, Dennis Ritchie develops C, used by Ken Thompson to rewrite UNIX (at Bell Labs)

• “The white book” by Brian Kernighan and Dennis Ritchie:


C: A High-Level Language
• Gives symbolic names to values
– don’t need to know which register or memory location

• Provides abstraction of underlying hardware
– operations do not depend on instruction set
– example: can write “a = b * c”, even though
LC-3 doesn’t have a multiply instruction


• Provides expressiveness
– use meaningful symbols that convey meaning
– simple expressions for common control patterns (if-then-else)

• Enhances code readability
• Safeguards against bugs
– can enforce rules or conditions at compiletime or run-time



Interpretation:

• Interpretation and compilation are different ways of translating high-level languages

• Interpretation
– interpreter = program that executes program
statements
– generally one line/command at a time
– limited processing power
– easy to debug, make changes, view intermediate results
– languages: BASIC, LISP, Perl, Java, Matlab, C-shell


Compilation
• Compilation
– translates statements into machine language

• does not execute, but creates executable program
– performs optimization over multiple statements
– change requires recompilation

• can be harder to debug, since executed code may be different
– languages: C, C++, Fortran, Pascal
– compilers can optimize








Click here for  Download PDF / FREE

Introduction to the C language 









0 commentaires: