Junior — Senior
Variations of pointer declarations with const qualifier
livecode
Task condition
The example presents four different syntaxes for applying const to pointers. It is necessary to clarify the meaning of each form: what data can be modified, which pointers can be reassigned, and how to correctly interpret each line.
int value = 1000;
const int* cont_int_ptr = &value;
int const* int_const_ptr_1 = &value;
int* const int_const_ptr_2 = &value;
const int* const const_int_const = &value;