What is the difference between exit() and return() in C?

Short Answer
Views 8624

Answer:

  • exit() is a system call which terminates current process. exit() is not an instruction of C language.
  • Whereas, return() is a C language instruction/statement and it returns from the current function (i.e. provides exit status to calling function and provides control back to the calling function).

Related Articles:

This section is dedicated exclusively to Questions & Answers. For an in-depth exploration of C Programming Language, click the links and dive deeper into this subject.

Join Our telegram group to ask Questions

Click below button to join our groups.