New course! Every coder should learn Generative AI!
Try a free lesson0
When to use return(0) and return(x)?
here x= any value
2 Answers
+ 2
return 0 is when you want to end the execution, return x is when you wants to return value to that function. Void
- 1
void does not return anything