Answer:
A successful call to exec() will return to the calling program only when the program loaded by exec() terminates without problems. exec() is a function in the C standard library that is used to execute a new program. When exec() is called, it replaces the current process with the new program, and the new program is executed in the place of the original process. If the new program terminates successfully, control is returned to the calling program. However, if the new program encounters an error or is terminated by the operating system, control will not be returned to the calling program.
Option 2, "never," is incorrect because a successful call to exec() will return to the calling program when the new program terminates successfully.
Option 3, "when the os preempts the calling process before the new code is executed," is also incorrect because exec() does not return control to the calling program until the new program terminates.
Option 1, "when the program loaded by exec() terminates without problems," is correct because this is the only situation in which exec() will return control to the calling program.