fork download
  1. #include <stdio.h>
  2.  
  3. void con() __attribute__((constructor));
  4. void des() __attribute__((destructor));
  5. void con(){
  6. printf("Hello world from con\n");
  7. return;
  8. }
  9.  
  10. void des(){
  11. printf("Hello world from des\n");
  12. }
  13.  
  14. int main()
  15. {
  16. printf("Hello world\n");
  17. return 0;
  18. }
Success #stdin #stdout 0s 5280KB
stdin
Standard input is empty
stdout
Hello world from con
Hello world
Hello world from des