Most of your questions can be answered here: C - Strings - Tutorialspoint
As for Q4: Assume that
makes the previously allocated memory block totally inaccessible going forward. Think about what might happen later in your program if you called free before you return from the function. What can the caller do with the returned pointer?