Skip to content

Commit b0b68a0

Browse files
committed
非const的char*指向常量区
1 parent 9f648fc commit b0b68a0

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#include <stdio.h>
2+
3+
int main(){
4+
char * s = "hello world";
5+
s[1] = 'X';
6+
return 0;
7+
}

0 commit comments

Comments
 (0)