HISTORY OF C
----------------------
- BCPL (Basic
Combined Programming Language), which
was developed by MartinRichards at
Cambridge
University.
- B language,
which is written by Ken Thompson
at AT&T Bell Laboratories. But
the B Language is useful for only some
specific problems.
- “Dennis
Ritchie” developed C language in the 1970’s at
Bell laboratories.
-
C (combined) Language has the features of both BCPL & B Language.
It is a middle level language. It is excellent, efficient
and general-purpose
language for most of the applications, such
as scientific business and system
software application.
Structure
of C
-C is the structured
language as well as case sensitive language.
C program structure are specified
below:
Comments
Preprocessor directives For
More Information
Global variables
main()
{
local variables
statement
---------------------
---------------------
}
func1() //other
function
{
local variables
statement
---------------------
---------------------
}
func2()
{
local variables
statement
---------------------
---------------------
}
Comment:
Comment
means instructions (lines) are not executed by the compiler.
In C language
comment statement are specified below:
Multiple line comment /*comment*/
Ex:
Program for addition
The #include directive
In C, #include
forms a preprocessor directive that tells the C
preprocessor to look for a
file and place the contents of the file in the
location which the #includes
directive indicates.
#include<stdio.h> allows
the program to interact with the screen,
keyboard and file system of your computer.
You will find it at the beginning
of almost every C program.