fork download
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. char *tmp_name(void)
  5. {
  6. static char name[30];
  7. static int sequence = 65;
  8.  
  9. strcpy(name, "tmp");
  10.  
  11. name[3] = sequence;
  12. name[4] = '\0';
  13.  
  14. return (name);
  15.  
  16. }
  17.  
  18. int main()
  19. {
  20. char *tmp_name(void);
  21.  
  22. printf("%s\n", tmp_name());
  23.  
  24. return (0);
  25. }
Success #stdin #stdout 0s 1720KB
stdin
Standard input is empty
stdout
tmpA