且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

更改字符串的指针,通过字面用C?

更新时间:2023-11-10 08:58:10

2号线点是在第1行只读,而你的可执行文件的数据段,程序初始化 S1 阵列给定的字符串。这是存储在堆栈中,您可以修改。

Line 2 points to the data section of your executable which is read-only, whereas in line 1, the program initializes s1 array with the given string. This is stored in stack, which you can modify.