更新时间:2023-02-03 09:30:01
Is the second alternative safe and portable in this scenario?
Yes! The storage allocation of string literals is static and they persist for the lifetime of the application.
从函数返回的字符串字面值地址安全可移植?
【C 语言】内存四区原理 ( 常量区示例 | 不同函数返回的相同字符串的指针地址相同 )