Не определено ли значение * b при вызове printf ()?
void foo(int *a) { const int *b = a; int *c = a; *c = 2; printf("%d\n", *b); // what must be *b? 1, 2 or undefined? } int d = 1; foo(&d);