c tutorials


  • WatchC Programming Tutorial - 1 - Introduction
  • WatchC Programming Tutorial - 2 - Setting Up Code Blocks
  • WatchC Programming Tutorial - 3 - How Computer Programs Work
  • WatchC Programming Tutorial - 4 - Print Text on the Screen
  • WatchC Programming Tutorial - 5 - Comments
  • WatchC Programming Tutorial - 6 - Conversion Characters
  • WatchC Programming Tutorial - 7 - Variables
  • WatchC Programming Tutorial - 8 - String Terminator
  • WatchC Programming Tutorial - 9 - I Need Arrays
  • WatchC Programming Tutorial - 10 - Creating a Header File
  • WatchC Programming Tutorial - 11 - Getting Input with scanf
  • WatchC Programming Tutorial - 12 - Math Operators
  • WatchC Programming Tutorial - 13 - Cats Love Bagels
  • WatchC Programming Tutorial - 14 - Calculating the Average Age
  • WatchC Programming Tutorial - 15 - How to Calculate Interest
  • WatchC Programming Tutorial - 16 - Typecasting
  • WatchC Programming Tutorial - 17 - Making Decisions Using if Statements
  • WatchC Programming Tutorial - 18 - Nesting if Statements
  • WatchC Programming Tutorial - 19 - if else
  • WatchC Programming Tutorial - 20 - What about more than two choices?
  • WatchC Programming Tutorial - 21 - Dont Beat Up Little Kids
  • WatchC Programming Tutorial - 22 - or
  • WatchC Programming Tutorial - 23 - Shorthand if else
  • WatchC Programming Tutorial - 24 - Increment Operator
  • WatchC Programming Tutorial - 25 - while Loops
  • WatchC Programming Tutorial - 26 - do while Loops
  • WatchC Programming Tutorial - 27 - for Loop
  • WatchC Programming Tutorial - 28 - How to Make a Table
  • WatchC Programming Tutorial - 29 - break
  • WatchC Programming Tutorial - 30 - continue
  • WatchC Programming Tutorial - 31 - switch
  • WatchC Programming Tutorial - 32 - A Few Cool Character Functions
  • WatchC Programming Tutorial - 33 - isupper and Challenge #1!
  • WatchC Programming Tutorial - 34 - strcat and strcpy
  • WatchC Programming Tutorial - 35 - puts and gets
  • WatchC Programming Tutorial - 36 - Rounding Numbers
  • WatchC Programming Tutorial - 37 - Absolute Value with abs
  • WatchC Programming Tutorial - 38 - Random Number Generator with rand
  • WatchC Programming Tutorial - 39 - int and float Arrays
  • WatchC Programming Tutorial - 40 - Why I am Banned from Fantasy Hockey
  • WatchC Programming Tutorial - 41 - Sorting Arrays
  • WatchC Programming Tutorial - 42 - Pointers
  • WatchC Programming Tutorial - 43 - Dereference Pointer
  • WatchC Programming Tutorial - 44 - Arrays and Pointers
  • WatchC Programming Tutorial - 45 - Strings and Pointers
  • WatchC Programming Tutorial - 46 - Problems with String Lengths
  • WatchC Programming Tutorial - 47 - The Heap
  • WatchC Programming Tutorial - 48 - Creating an Expandable Program using the Heap
  • WatchC Programming Tutorial - 49 - Structures
  • WatchC Programming Tutorial - 50 - Writing Files in C

C – Language History

  • The C programming language is a structure oriented programming language, developed at Bell Laboratories in 1972 by Dennis Ritchie
  • C programming language features were derived from an earlier language called “B” (Basic Combined Programming Language – BCPL)
  • C language was invented for implementing UNIX operating system
  • In 1978, Dennis Ritchie and Brian Kernighan published the first edition  “The C Programming Language” and commonly known as K&R C
  • In 1983, the American National Standards Institute (ANSI) established a committee to provide a modern, comprehensive definition of C. The resulting definition, the ANSI standard, or “ANSI C”, was completed late 1988.

C programming language standards:

  • C89/C90 standard – First standardized specification for C language was developed by the American National Standards Institute in 1989. C89 and C90 standards refer to the same programming language.
  • C99 standard – Next revision was published in 1999 that introduced new features like advanced data types and other changes.

C11 and Embedded C language:

  • C11 standard adds new features to C programming language and library like type generic macros, anonymous structures, improved Unicode support, atomic operations, multi-threading and bounds-checked functions. It also makes some portions of the existing C99 library optional and improves compatibility with C++.
  • Embedded C includes features not available in C like fixed-point arithmetic, named address spaces, and basic I/O hardware addressing.
  • Operating systems, C compiler and all UNIX application programs are written in C language
  • It is also called as procedure oriented programming language. The C language is reliable, simple and easy to use. C has been coded in assembly language.

Features of C programming language:

  • Reliability
  • Portability
  • Flexibility
  • Interactivity
  • Modularity
  • Efficiency and Effectiveness

Uses of C programming language:

The C programming language is used for developing system applications that forms a major portion of operating systems such as Windows, UNIX and Linux. Below are some examples of C being used.

  • Database systems
  • Graphics packages
  • Word processors
  • Spreadsheets
  • Operating system development
  • Compilers and Assemblers
  • Network drivers
  • Interpreters

Which level is C language belonging to?

S.no
High Level
Middle Level
Low Level
1High level languages provide almost everything that the programmer might need to do as already built into the languageMiddle level languages don’t provide all the built-in functions found in high level languages, but provides all building blocks that we need to produce the result we wantLow level languages provides nothing other than access to the machines basic instruction set
2Examples:
Java, Python
C, C++Assembler

The C language is a structured language

S.no
Structure oriented
Object oriented
Non structure
1In this type of language, large programs are divided into small programs called functionsIn this type of language, programs are divided into objectsThere is no specific structure for programming this language
2Prime focus is on functions and procedures that operate on the dataPrime focus is in the data that is being operated and not on the functions or proceduresN/A
3Data moves freely around the systems from one function to anotherData is hidden and cannot be accessed by external functionsN/A
4Program structure follows “Top Down Approach”Program structure follows “Bottom UP Approach”N/A
5
Examples:
C, Pascal, ALGOL and Modula-2
C++, JAVA and C# (C sharp)
 BASIC, COBOL, FORTRAN

Key points to remember in C language:

  1. The C language is structured, middle level programming language developed by Dennis Ritchie
  2. Operating system programs such as Windows, Unix, Linux are written in C language
  3. C89/C90 and C99 are two standardized editions of C language
  4. C has been written in assembly language

C language tutorial reference E-books & research papers:

  • [ANSI 89] American National Standards Institute., American National Standard for Information  Programming Language C, X3 159-1989
  • [Kernighan 78] B. W. Kernighan and D. M. Ritchie, The C Programming Language, Prentice-Hall: Englewood Cliffs, NJ, 1978. Second edition, 1988.
  • [Thinking 90] C* Programming Guide, Thinking Machines Corp.: Cambridge Mass., 1990.

Tags Cloud