Rules Regarding 'C' Programm
1) At the beginning of the program we should include some header file with the help of #include statement.
For eg :-
#include<stdio.h>
#include<conio.h>
#include<math.h>
2) The first function is main( ) or void main( ).
If a program begins with main( ) then it should end with return(0);
If a program begins with void main( ) then return(0); is not necessary.
3) All the statement should be enclosed in a pair of braces as { and }
4) All the statement in 'C' should be written in lower case alphabets
5) The statement #include, #define, main( ) and void main( ) should not end with semi colon but all other statement must end with a semi colon.
6) The comment / remarks regarding a program should be enclosed with in /* */ marks. These comment can appear any where in the programm.
Note that :- A comment is a non-executable or non-programmable statement
For eg :- /* Calculation of Simple interest */
7) Blank spaces can be introduced between two words to improve the readability of the programm
8) After typing the entire programm to compile it press Alt + F9
To run the programm press ctrl + F9
To view the output press Alt + F5
For eg :-
#include<
#include<
#include<
2) The first function is main( ) or void main( ).
If a program begins with main( ) then it should end with return(0);
If a program begins with void main( ) then return(0); is not necessary.
3) All the statement should be enclosed in a pair of braces as { and }
4) All the statement in 'C' should be written in lower case alphabets
5) The statement #include, #define, main( ) and void main( ) should not end with semi colon but all other statement must end with a semi colon.
6) The comment / remarks regarding a program should be enclosed with in /* */ marks. These comment can appear any where in the programm.
Note that :- A comment is a non-executable or non-programmable statement
For eg :- /* Calculation of Simple interest */
7) Blank spaces can be introduced between two words to improve the readability of the programm
8) After typing the entire programm to compile it press Alt + F9
To run the programm press ctrl + F9
To view the output press Alt + F5
0 comments:
Post a Comment