Introduction :
- ‘C’ is a Programming Language.
- Programming Language is a language which is used to write different computer programs.
- Program is a set or group or collection of commands.
- Command is an instruction which is given to the computer to perform a particular task or job.
- Software is a collection or group of programs.
History :
- ‘C’ was originally developed by Dennis Ritchie at AT&T Bell laboratories of Cambridge University in the early 1970’s.
- How did the language acquire a cryptic name such as ‘C’ ?
The earliest version of ‘C’ also developed at the Bell labs, was known as BCPL (Basic Combined Programming Language ).
Later, another of Bell’s system engineer called Ken Thompson improved the BCPL language and named it as ‘B’, borrowing the first initial letter from BCPL.
Subsequently, the ‘B’ language was modified and improved to its present state, and was called ‘C’, using the second initial from the BCPL.
Structure of a ‘C’ program :
/* Structure of a ‘C’ program */
#include<stdio.h>
#include<conio.h>
main()
{
clrscr();
printf(“ Welcome to C programming. \n”);
getch();
}
Explanation about the structure :
- /* and */ are called comments. The text written in between these symbols are treated as a comment. While executing the C-program, the compiler will ignore this comment. These are used only for documentation i.e. to easily understand the program.
- The #(Hash) symbol implies that a preprocessor directive is invoked.
- include is a statement is used to include the other header files or source files into the program.
- <stdio.h> is name of the standard input-output header file. This file contains several functions like scanf() and printf() to perform input and output operations.
No comments:
Post a Comment