Why is modifying read only memory an undefined behaviour in C/C++?

前端 未结 0 1827
别那么骄傲
别那么骄傲 2020-11-28 03:36
char *s = "hello world". 
s[0] = \'H\';

Above is undefined behaviour in C/C++.

But it it seems pretty defined to me. You try to cha

相关标签:
回答
  • 消灭零回复
提交回复
热议问题