C Program Learning Part-1
C Programming Overview
*In 1967, Martin Richards developed a language called BCPL (Basic Combined Programming Languages)used for writing system software.
*B was developed by Ken Thompson used to create UNIX operating system.
*Dennis Ritchie at Bell Laboratories C was created with the combination of ALGOL, BCPL and B.
Years | Language | Inventor |
1960 |
ALGOL |
International Group |
1967 |
BCPL |
Mertin Richards |
1970 |
B |
Ken Thompson |
1972 |
Traditional C |
Dennis Ritchie |
1978 |
K&R C |
Kerninghan and Ritchie |
1989 |
ANSI |
ANSI Commitee |
1990 |
ANSI/ISO C |
ISO Committee |
1999 | C99 | Standarization Comittee |
Importance Of C
*Rich set of built-in functions and operators to write complex program.
*C compiler combines assembly language and High Level Languages.
*C are efficient and fast.
*32 key words and strength lies in its built-in functions.
*C is highly portable.
*C is well suited for structured programming.
Sample Program: Printing a Message
main()
{
/*…. Printing begind….*/
printf(“I see, I remember,”);
}
Out put: I see, I remember,
Format of C Programming
i. main() : Function name. It informs the system the name of the program is main and the execution begins at this line.
ii. The opening brace “{” and the closing brace “}” contain the function body. Its contains a set of instructions to perform the given task.
iii. C does not distinct between uppercase and lowercase letter.
……………… Each Statement must end with a semicolon (;)
The #define Directives
{
Declaration Part |
Execution Part |
}
Subprogram Section
Function 1
. User defined function
Function n