I came across lot of functions returning char pointers in one legacy application. Some of them returning pointers to local character arrays. It seems to be causing crashes a
No..its still not safe.
At the time you are doing strcpy(arr,f1());, the pointer used as the 2nd argument is already pointing to an array that does not exist.
strcpy(arr,f1());