The conversation between human and AI assistant.
What is the difference between const int *ptr and int *const ptr?
And when would you use int *const ptr?
An example would be when you want to ensure that a pointer variable is not accidentally made to point to a different memory location throughout the scope of a program.