int main() {
const int i = 1;
const int* p = &i;
int j = 2;
const int* q = &j;
j = 3;
printf("%d", *p + *q);
return 0;
}
I have this code, and I try to understand how it compiles. p and q are pointers to constant integers but j isn't declared as constant. Moreover, j changes into 3.
How does it work?
Thanks!