New course! Every coder should learn Generative AI!
Try a free lesson0
What is the use and importance of the "Return type " function and also return 0 .
what do they mean?
1 Answer
0
When writing a function it can either have a return type (specified by you) of no return type at all. For example - in a language like c#, when writing a function can say something like
public bool foo(){
return true;
}
the bool specifies that the function must return a boolean value.
If a return type is not needed, you can simply write:
public void foo(){}
the void specifies that there will be no return type.