[LCP]Why do I do this? or exit() vs. return
Vincent.Penquerch at artworks.co.uk
Wed Jul 16 17:01:02 UTC 2003
> I always saw return and exit as having two completely
> separate purposes.
The original question was considering the difference from the
main function, from which a return exits the program. Some may
argue that a sequence of returns is best, and I mainly agree,
though it all depends on the circumstances. Nonetheless, any
program exiting "normally" usually has an elegant sequence of
returns going back to main.
More information about the linuxCprogramming