- exit() is a function that are able to terminate the running program.
-It is predefined in process.h header file
Syntax-
exit(value);
-Here value is 0,1,2,3,4,...
Use of exit() function:
-In programming, if you want to terminate your program at certain point then you use this function.
program-
#include< stdio.h>
#include< process.h>
int main()
{
printf("Inside main\n");
exit(0);
printf("After exit function")
}
Inside main