Frequently Asked C Language Interview Question & Answers
Is using exit() the same as using return?
No, the exit() function is used to exit from your program and return control to the operating system. The return statement is used to return from a function and return control to the calling function. If you issue a return from the main() function, you are essentially returning control to the calling function, which is the operating system. In this case, the return statement and exit()function are similar.