Hello and Asalam o Alikum.
I have shifted to dev C++ compiler.So, from now onward, the programs of my blog would be written in dev c++ compiler.
Today I am here with the simplest example of function. It is about printing a simple statement in C++ using function.
One concept which is important and I want to mention here is "parameters".
I have shifted to dev C++ compiler.So, from now onward, the programs of my blog would be written in dev c++ compiler.
Today I am here with the simplest example of function. It is about printing a simple statement in C++ using function.
One concept which is important and I want to mention here is "parameters".
Parameters
Parameters are the values that are provided to a function when the function is called.If there is no parameter, only parenthesis are used.
Below is the source code of that simple example of function which I mentioned above.
Source code
Output
Explanation:
Line # 4 :
This is actually a function declaration and the empty parameter shows that it has no argument.
Line # 7:
It is a function call.
Line # 10:
it is a function definition that tells what a function actually does.
No comments:
Post a Comment