C language is a high level language. It is developed by Dennis M. Ritchie. C language was first implemented on DEC PD-11 computer. C language has become a professional language.
Why use C Language ?
It is
- Easy to learn.
- Produce efficient programs.
- Can be compiled on various computer platforms.
C program
Let's look at our first program.
#include directive tells the C compiler to include stdio.h file.
Line 2:
main() is the function, where the program execution start.
Line 3:
Curly Braces { tells the compiler, where the main program start.
Line 4:
Printf() is a function which print the message contain in parenthesis,
Line 5:
Curly Braces } tells the compiler that the main program is now end.
C language basically consist of the following main parts.
- Variable
- Function
- Preprocessor command
- Statements
- Comments
Let's understand one by one.
In this example
Line 1, show preprocessor command.
Line 2, show the main function.
Line 3, show the comment.
Line 4, show the another function.
No comments:
Post a Comment