1 Answers
```html
Understanding the Difference Between const char* ptr and char* const ptr in C++
The focus keyword for this topic is C++ pointer.
In C++, const char* ptr
declares a pointer to a constant character, meaning the pointer itself can be modified but the pointed-to character value cannot be changed. On the other hand, char* const ptr
declares a constant pointer to a character, where the pointer's address cannot be modified but the pointed-to value can be changed.
```
Please login or Register to submit your answer