What will the code display on compiling?
void funccall()
{
printf("this is funccall\n");
}
void main ()
{
atexit(funccall);
printf("program starts\n");
printf("program ends\n");
}
Answer: C
int atexit(void (*func)(void)) calls the specified function func when the program terminates. we can register termination function anywhere in the program, but it will be called at the time of the program termination.