adplus-dvertising
frame-decoration

Question

Which of the following function can be used to terminate the main function from another function safely?

a.

return(expr);

b.

exit(expr);

c.

abort();

d.

Both exit(expr); and abort();

Posted under C Programming

Answer: (b).exit(expr);

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Which of the following function can be used to terminate the main function from another function safely?