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.