Merge sorted linked list

in this method the function is returning c node every time so when the 2nd time c node is declared , why does the value is not overwritten ?

NO

every function has its own c
when function return statement executed then all the variable declare will get free and memory will released

so no overwritten happens