Exit() is same as return?

Options
- Yes
- No


CORRECT ANSWER : No

Discussion Board
exit and return

-No, exit function not same as a return.
-exit() function used to exit from program & return control to the operating system.
-The return statement is used to return from function & control return to the calling function.
-In case, if we return from main() function, then we are returning control to the calling function, i.e the operating system. In this case the return & exit statements are same.

Sapna 02-14-2017 06:38 AM

Exit() and Return()

Answer : no.

The return function is an instruction of the language that returns from a function call &
The exit function is a system call (not a language statement) that terminates the current process.


Jayesh Sonar 02-24-2015 03:55 AM

exit() function

The function exit() terminates the process that
calls the exit.

Aparna 07-5-2013 03:32 AM

Write your comments


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement