First your code will not work at all except returning local address as per told by technosavvy. Just correct it.

Now you should never return address of local variable. When you are calling function stack frame will create. when it's runninf the line 'return' then all local variables will be deleted. Just think if you are returning the address of local variables which is already deleted.