Can any one tel me how exit() in C is implemented?
Thanks in advance
It is OS-dependent. In general, exit() first runs any exit handler functions that have been registered using atexit(), then it initiates a C library teardown routine (flushes any data remaining in open file handles, releases any specially-acquired resources, etc.). Finally, it makes a system call (OS-dependent) which actually terminates the process.