It's the old call-by-value trick.
fff is a pointer to char which you initialize to NULL
You pass the value of fff to the function x().
x() stores the value of fff on the stack before it begins execution and calls it d.
During execution, x() changes the parameter d on the stack; this does not in any way affect the variable fff.
When x() returns, the parameter d goes away and no longer exists.
fff never was touched by x() and so still contains its initial value of NULL.
You need to pass to x() a pointer to the char pointer:
void x(char **d);
void x(char **d)
strcpy(*d, "t e x t---");
Since x() now works with a pointer to fff, it can change the value of fff.