+ 1
What do you mean by return type? Explain with an example
2 Answers
+ 3
Example for void function:
void main()
{
int a=5,a=5,c;
{
c=a+b;
}}
the example is declared in void function.a and b values are calculate and it stored in c variable.
Example for return type:
int main()
{
int a=5,b=5;
return(a+b);
}
This example is declared in int function. int main() function used for return any value.this example a+b values are returned.extra c variable cannot be used in this example.



