What is the difference between executing the return 0; statement and its rough equivalent, a call to the exit(0); function, or the difference between return 1; and exit(1);?

a) These are very nearly equivalent anywhere they are encountered.
b) These are very different if encountered in a function other than main();.The
exit function terminates the program, returning control to the operating system,
whereas return only terminates the function, returning control to the calling
function.
c) These are very nearly equivalent when executed in the main function. In main,
these both terminate main and send a success code to the operating system,
returning control to the operating system.
d) Both these return control to the free store manager by way of the exception
controller, sending the argument as an error code.


b) These are very different if encountered in a function other than main();.The
exit function terminates the program, returning control to the operating system,
whereas return only terminates the function, returning control to the calling
function.
c) These are very nearly equivalent when executed in the main function. In main,
these both terminate main and send a success code to the operating system,
returning control to the operating system.

Computer Science & Information Technology

You might also like to view...

When exporting Access data into an existing workbook, if you use the ________ to export selected records, the original data in the Excel workbook is overwritten

Fill in the blank(s) with correct word

Computer Science & Information Technology

Select a group of sequential slides using ________

Fill in the blank(s) with correct word

Computer Science & Information Technology

The OR logical function displays FALSE if one condition is false and the other condition is true

Indicate whether the statement is true or false.

Computer Science & Information Technology

If your working space is limited, or for laptop computers, consider using a:

a. touchscreen b. graphics tablet c. trackball d. Magnetic Card Reader e. barcode reader

Computer Science & Information Technology