Q55 What is difference and purpose of using exit() and return() in a function?

exit() is used to exit our program and return control to the operating system and return() is used to return from function and return control to the calling function but if we use return() in main function then in this case both exit() and return() works same thing.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.