If you want to execute C program even after main function is terminated, which function can be used?

Short Answer
Views 830

Answer:

  • atexit() function can be used if we want to execute any function after program is terminated normally.
  • Syntax: int atexit (void (*func)(void));
  • The function “func” will be called automatically without any arguments once program is terminated normally.

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.