Hi M Raghavendra
There is a search function for the Q&A Discussions area which you many use to find many commonly asked questions. Here is one example I found.
There are many more, give the search function a try :)
//doesn't have a return statement
//(void = nothing)
//returns an ineger
//integer = number
Of corse, the number "1" could be an variable and be like
or something, but i hope you understood what i mean.
int main() returns an int, bool main() returns a boolean and void main() returns nothing.
If not, have a look at Datatypes😉🔥
using return type will allow:
If u want to use the output of a function later in the code or want to do more processing u can store it in a separate variable.
By using same Kind of variable as the return statement will give you you
int squAre(int a)
int c = squAre(3);
OR you can directly print it:
on the other side if you use void you will not be able to get the output of the code(mean you can get the result in a variable easily
but to get this you can use reference an store the out put value in a variable