Chapter 9: Problem 11
What is the difference between a pointer to a constant and a constant pointer?
Short Answer
Expert verified
Short Answer: The primary difference is that a pointer to a constant cannot change the value it points to, while a constant pointer cannot change the address it points to. A pointer to a constant is declared as: const data_type *pointer_name; and a constant pointer is declared as: data_type *const pointer_name.
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.