Skip to content

Instantly share code, notes, and snippets.

@psyomn
Created August 22, 2015 21:53
Show Gist options
  • Select an option

  • Save psyomn/2eb6d1801ca1480bcd41 to your computer and use it in GitHub Desktop.

Select an option

Save psyomn/2eb6d1801ca1480bcd41 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <stdlib.h>
void my_at_exit(void) {
printf("I am doing things before exiting\n");
}
int main(void) {
atexit(my_at_exit);
printf("Potato Potato Potato\n");
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment