COMMENT :
Comments are almost the good thing of a program. They are generally used by a programmer to explain their programming statement’s purpose for which they are used in the program.
Comments are generally written in two ways in a program and these ways are as –
1] //comment
2] /* comment */
The main difference between both of these two ways of writing the comments is that the first way is only used by a programmer when there is a single line comment and the other way, is used by the programmer when there is the requirement of the multi line comment.
NOTE: Comments are not the part of the program while executing the program or compiling the program.
THE #include directive :
It is also known as Preprocessor directive. The #include directive is used to make the inclusion of any header file in the program. In other words, the preprocessor directive #include tells the compiler to insert another file into your source file.
HEADER FILE :
Header file is a collection of functions or routines which are required frequently by a program. In other words, header file is a collection of similar types of commands.
Header files are the declaration of predefined functions that are going to be used in the main () i.e. in the body of the program. The extension of the header file is .h.
There are two ways of writing the header file in a C++ program and these are as –
1] IN ANGULAR BRACKETS ( < > )
2] IN DOUBBLE INVERTED COMMAS ( “ “ )
Header file in angular brackets means search the written file in current directive and header file in double inverted commas means search the written file anywhere in the computer. There are many header file in C++, different header file is used for including many different predefined functions in the program. Few examples of the header files in C++ are -
1] iostream.h
2] conio .h
3] math.h
And many more. Whenever a program is compiled, the compilation is always done from the header file by the compiler.
TYPE:
Every function in C++ returns some value and the type of value which is being returned by the function is the return type of the function.
FOR EXAMPLE – if the function is returning integer value then the type of the main () will be int .
NOTE: if the function is not returning any value then the type should be written as void, which means empty or blank.
MAIN() :
The main() is generally used to write the main module of the program. It is only the part where we actually do the programming or actually uses our programming statement and concepts.
Whenever a program is executed, the execution is always done from the main() by the compiler.
main() is the most important part of any C++ program. If main() is not included in the program then, the program becomes the part of an error and if there is only one function in the program then, it should be the main().
THE CURLEY BRACES:
The Curley braces are the kind of operator, used in the C++ program for making the group of statements as a block or as a single group and that group will belong to the statement mentioned above the place where the braces are starting.
Comments are almost the good thing of a program. They are generally used by a programmer to explain their programming statement’s purpose for which they are used in the program.
Comments are generally written in two ways in a program and these ways are as –
1] //comment
2] /* comment */
The main difference between both of these two ways of writing the comments is that the first way is only used by a programmer when there is a single line comment and the other way, is used by the programmer when there is the requirement of the multi line comment.
NOTE: Comments are not the part of the program while executing the program or compiling the program.
THE #include directive :
It is also known as Preprocessor directive. The #include directive is used to make the inclusion of any header file in the program. In other words, the preprocessor directive #include tells the compiler to insert another file into your source file.
HEADER FILE :
Header file is a collection of functions or routines which are required frequently by a program. In other words, header file is a collection of similar types of commands.
Header files are the declaration of predefined functions that are going to be used in the main () i.e. in the body of the program. The extension of the header file is .h.
There are two ways of writing the header file in a C++ program and these are as –
1] IN ANGULAR BRACKETS ( < > )
2] IN DOUBBLE INVERTED COMMAS ( “ “ )
Header file in angular brackets means search the written file in current directive and header file in double inverted commas means search the written file anywhere in the computer. There are many header file in C++, different header file is used for including many different predefined functions in the program. Few examples of the header files in C++ are -
1] iostream.h
2] conio .h
3] math.h
And many more. Whenever a program is compiled, the compilation is always done from the header file by the compiler.
TYPE:
Every function in C++ returns some value and the type of value which is being returned by the function is the return type of the function.
FOR EXAMPLE – if the function is returning integer value then the type of the main () will be int .
NOTE: if the function is not returning any value then the type should be written as void, which means empty or blank.
MAIN() :
The main() is generally used to write the main module of the program. It is only the part where we actually do the programming or actually uses our programming statement and concepts.
Whenever a program is executed, the execution is always done from the main() by the compiler.
main() is the most important part of any C++ program. If main() is not included in the program then, the program becomes the part of an error and if there is only one function in the program then, it should be the main().
THE CURLEY BRACES:
The Curley braces are the kind of operator, used in the C++ program for making the group of statements as a block or as a single group and that group will belong to the statement mentioned above the place where the braces are starting.
