CPP - Pointers PDF

char *pointer = “abc” sets pointer to the address of the “abc”
string (which may be stored in read-only memory and thus
unchangeable)

Please explain this line.

hello @yajurkhurana i didnt understand what you want to ask in doubt ?

hey @yajurkhurana is there any const also behind char* ?

What does it mean by read only memory and thus interchangeable in the line above?

see it has const so that means you cannot make modification this is means that you can print or read this only.
you cant modify this means anything like appending or .
Happy Learning !!

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.