What are the differences between exit() and return statement?
Answer:
-First difference is that exit() is a function while return is a statement.
-Second difference is that exit() function terminates the program while return statement terminate the function.
-Third difference is that exit() function always return some value where it is optional for return statement.