Normally, when variables go out of scope, they are automatically destroyed. After fct() returns, the array is automatically destroyed, with d pointing to the array that was destroyed. Thus, doing any operations with it, results in undefined behaviour.
static allows the variable to live as long as the program, so when fct() returns, d holds the array, declared in fct().