We have seen the structure of C language it was the basic one but important to know in detail to learn more about C language.
The starting of the C program is done by the file:
#include<stdio.h>
It is known as header file known as standard input output file and ".h" is the extension for the header file. This file is important because without it program cannot be defined.
Thereafter the function "main()" is used. It makes the compiler know that the program is going to be started and without this function output cannot come , it is one of the main functio of the file without it program cannot be runned.
Now you can see curly brackets "{" under the main function it indicates the starting of the program. The content of the program is written inside this curly bracket .
Now we can see the line printed inside the "/*........*/" . It indicates the comment kept by the programmer to make other programmer understand the program. In fact the comments are of two types
1. /*.............*/ - Single line comment
2. //............... - Double line comment
There is no much difference between both of them.
Then we can see the line inside "printf( ....);" .It is the statement given to the compiler to print and the ";" is the necessary symbol needed to complete that statement otherwise it will show error at the time of compiling.
The "getch();" is the function needed for the completion of program but it is not every time necessary to write.
This was all about the structure of C language program of basic .
NOTE:- To know more about the C language continue reading this blog - KING's BLOG.
The starting of the C program is done by the file:
#include<stdio.h>
It is known as header file known as standard input output file and ".h" is the extension for the header file. This file is important because without it program cannot be defined.
Thereafter the function "main()" is used. It makes the compiler know that the program is going to be started and without this function output cannot come , it is one of the main functio of the file without it program cannot be runned.
Now you can see curly brackets "{" under the main function it indicates the starting of the program. The content of the program is written inside this curly bracket .
Now we can see the line printed inside the "/*........*/" . It indicates the comment kept by the programmer to make other programmer understand the program. In fact the comments are of two types
1. /*.............*/ - Single line comment
2. //............... - Double line comment
There is no much difference between both of them.
Then we can see the line inside "printf( ....);" .It is the statement given to the compiler to print and the ";" is the necessary symbol needed to complete that statement otherwise it will show error at the time of compiling.
The "getch();" is the function needed for the completion of program but it is not every time necessary to write.
This was all about the structure of C language program of basic .
NOTE:- To know more about the C language continue reading this blog - KING's BLOG.
No comments:
Post a Comment