Senin, 30 November 2015

Catatan C Language Introduction




     Sejarah Bahasa C


          Designed by Denis M. Ritchie in 1972 at Bell Labs.
          Improved version of BCPL (Martin Richard, 1967) and B language (Ken Thompson, 1970)
          Assisted by Brian W. Kernighan, Ritchie wrote a book The C Programming Language (1978). Or known as K-R C / classic C.
          Newer version of C language: Ansi C 1989, iso C 99.
  
Why Using C ?

          Flexibility : close to low level machine language yet easy to understand.
          Portability : used from micro computer to super computer.
          A well known programming language in many forms of implementations: O/S, scientific application, business app., etc.
          Supported with a large number of libraries.


     C Structure



          C language is a structural programming language.
          It consist of functions.
          There is no separation between function and procedure (if you are from Pascal language background).
          Each C program has one main function called –surprisingly– main.
          Program will be started from the first line of the main function.
          C language is case-sensitive.
          Every statement should ended with a semi-colon(;) .







     Escape Sequences



          \a            bell, alert, system beep
          \b            back space
          \t             horizontal tab
          \n            new line, line feed
          \v            vertical tab
          \r             carriage return
          \’          single quote
          \”          double quote
          \\             backslash
          \xdd hexadecimal notation
          \ddd octal notation