Introduction to C Programming
Dennis Ritchie
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system.
Design
C is an imperative (procedural) systems implementation language. It was designed to be compiled using a relatively straightforward compiler, to provide low-level access to memory, to provide language constructs that map efficiently to machine instructions, and to require minimalrun-time support. C was therefore useful for many applications that had formerly been coded in assembly language.
Despite its low-level capabilities, the language was designed to encourage cross-platform programming. A standards-compliant and portablywritten C program can be compiled for a very wide variety of computer platforms and operating systems with few changes to its source code. The language has become available on a very wide range of platforms, from embedded microcontrollers to supercomputers
Characteristics
Like most imperative languages in the ALGOL tradition, C has facilities for structured programming and allows lexical variable scope andrecursion, while a static type system prevents many unintended operations. In C, all executable code is contained within functions. Function parameters are always passed by value. Pass-by-reference is simulated in C by explicitly passing pointer values. Heterogeneous aggregate data types (struct) allow related data elements to be combined and manipulated as a unit. C program source text is free-format, using the semicolon as a statement terminator.
C also exhibits the following more specific characteristics:
Partially weak typing; for instance, characters can be used as integers
Low-level access to computer memory by converting machine addresses to typed pointers
Function and data pointers supporting ad hoc run-time polymorphism
array indexing as a secondary notion, defined in terms of pointer arithmetic
A preprocessor for macro definition, source code file inclusion, and conditional compilation
Complex functionality such as I/O, string manipulation, and mathematical functions consistently delegated to library routines
A large number of compound operators, such as +=, -=, *=, ++, etc.
Keywords
C 32 keywords (reserved words with special meaning):
auto double int struct
break else long switch
case enum register typedef
char extern return union
const float short unsigned
continue for signed void
default goto sizeof volatile
do if static while
General Info:
Imperative (procedural),structured
Appeared in 1973
Designed by Dennis Ritchie
Developer Originally:Dennis Ritchie & Bell Labs
ANSI C: ANSI X3J11
ISO C:ISO/IEC JTC1/SC22/WG14
Stable release:C99 (March 2000)
Preview release:C1X
Typing: discipline Static, weak, manifest,nominal
Major implementations:Clang, GCC, MSVC, Turbo C, Watcom C
Dialects:Cyclone, Unified Parallel C,Split-C, Cilk, C*
Influenced by By: (BCPL, CPL), ALGOL 68,[3] Assembly, PL/I,FORTRAN
Influenced Numerous: AMPL, AWK,csh, C++, C-- , C#,Objective-C, BitC, D, Go,Java, JavaScript, Limbo,LPC, Perl, PHP, Pike,Processing
OS:Cross-platform (multi-platform)
Usual filename extensions:.h .c