c - Where are strings returned from functions in libc allocated? -


I started some socket programming, and I ran the function inet_ntoa. The prototype in the function four * inet_ntoa (struct in_addr in); .

So how / where will this string be allocated? Do I expect to make free calls on this?

From:

Inet_ntoa () function standard numbers and dots notation In the network byte for a string changes the host host address given in the order. The string is returned to Fixed Allocated Buffer , after which the calls will be overwritten

So, no.

Comments