Registers a function to be called when the program exits normally.
The registered function will be executed when the program terminates through
normal means (such as returning from main or calling exit()). Functions
are called in reverse order of registration (last registered, first called).
Parameters:
- f : The function to be called at program exit. This function takes no
parameters and returns no value.