'C' the name seems some what strange for a programmin language, but you can be amazed to hear that it is the one of the most popular language today. It is one of the 'BASIC COMBINED LANGUAGE' (BPCL) called B and developed in 1960's at Cambridge University. B language was modified by Dennis Ritchie and was implemented at Bell Laboratories in 1972. The new language was named C. It was developed along with the UNIX operating System.Although it was originally intended to run under UNIX, there was a great interest in running it on the IBM PC and compatibles, and other systems.
For many years , C was used mainly in academic enviornments, but eventually with the release of C compilers for commercial use and the increase popularity of UNIX, it begin to gain widespread support among computer professionals. Today C is running under a number of operating systems including MS-DOS.
Approximately 75 percent of all new commercial programs introduced for the IBM PC have been written in C, and the percentage is probably growing. Apple Macintosh system software was formerly written in Pascal, but is now almost always written in C. The entire Applix 1616 operating system is written in C, with some assembler routines.
FEATURES OF 'C'
The C programming model is that the programmer knows exactly what they want to do and how to use the language constructs to achieve that goal. The language lets the expert programmer express what they want in the minimum time by staying out of their way.
C is "simple" in that the number of components in the language is small-- If two language features accomplish more-or-less the same thing, C will include only one. C's syntax is terse and the language does not restrict what is "allowed" -- the programmer can pretty much do whatever they want.
C's type system and error checks exist only at compile-time. The compiled code runs in a stripped down run-time model with no safety checks for bad type casts, bad array indices, or bad pointers. There is no garbage collector to manage memory. Instead the programmer mangages heap memory manually. All this makes C fast but fragile.
'C' is highly portable. It means that C pogram written for one computer can be run on another with little or no modification. This feature is important because if we plan to use a new computer with different operating system.
'C' is well suited for Structured Programming, thus requiring the user to think of a problem in terms of function modules or blocks.
'C's another feature is its ability to extend itself. C program is basically a collection of functions that are supported by C library. We can continuously add our own functions to C library. With the availability of a large number of functions, the programming tasks becomes simple.
Sample program of 'C'
Consisder a very simple program given below. The program when executed will produce the following output
Lets have a close look over the above program:
FEATURES OF 'C'
The C programming model is that the programmer knows exactly what they want to do and how to use the language constructs to achieve that goal. The language lets the expert programmer express what they want in the minimum time by staying out of their way.
C is "simple" in that the number of components in the language is small-- If two language features accomplish more-or-less the same thing, C will include only one. C's syntax is terse and the language does not restrict what is "allowed" -- the programmer can pretty much do whatever they want.
C's type system and error checks exist only at compile-time. The compiled code runs in a stripped down run-time model with no safety checks for bad type casts, bad array indices, or bad pointers. There is no garbage collector to manage memory. Instead the programmer mangages heap memory manually. All this makes C fast but fragile.
'C' is highly portable. It means that C pogram written for one computer can be run on another with little or no modification. This feature is important because if we plan to use a new computer with different operating system.
'C' is well suited for Structured Programming, thus requiring the user to think of a problem in terms of function modules or blocks.
'C's another feature is its ability to extend itself. C program is basically a collection of functions that are supported by C library. We can continuously add our own functions to C library. With the availability of a large number of functions, the programming tasks becomes simple.
Sample program of 'C'
Consisder a very simple program given below. The program when executed will produce the following output
OUTPUT:
Hello, you are in expertinc Blog.
PROGRAM:
main()
{
/*------printing begins---------*/
printf("Hello, you are in expertinc Blog.");
/*-----printing ends-----------*/
}
- First Line inform the system the name of program is main and execution begins from this line. The main() is the special function used by C to tell the computer where the program starts. The empty pair of parentheses immediately following main indicates that the function main has no arguments(parameters).
- printf() function is the only executable statement program. It should print on screen whatever is between the starting and ending braces.
- The opening brace '{' in the second line marks the beginning of the function main and the cloing brace '}' indicates the end of the function. All the statements between these two braces form the function body.
- Every 'C' program requires a main() function.
- 'C' programs are written in lowercase letters. Uppercase letters are used for smbolic names and output strings.
- Every Program statement in a 'C' program must end with a semicolon(;).
- All variables must be declared for their types before they are used in the program.
- We must make sure to include header files using #include directives.
- When braces are used to group statements, make sure that the opening brace has a corresponding closing brace.
- A comment can be inserted almost anywhere a space is there. Comments can be written between /* and */ symbols.

