#include int main() { const int a = 12; int *p; p = &a; *p = 70; }
Will it work?
It does indeed work with gcc. It didn't like it though:
test.c:6: warning: assignment discards qualifiers from pointer target type
But the value did change when executed. I won't point out the obvious no-no...