Full concept of return(0), return | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Full concept of return(0), return

I'm confused this concept

18th Aug 2017, 1:09 PM
pandian
1 Answer
+ 3
Returns data from a function to whatever called it. In the case of the main loop, it's returning you to your OS and can provide some form of a status / error (if necessary). To put it simply, what do you want a function to -return- to you. If you allow it to return data to you, then you can use the results where you originally called it from.
18th Aug 2017, 2:08 PM
AgentSmith