How can you protect a character pointer by some accidental modification with the pointer address?
Using the const keyword we can protect a character pointer by some accidental modification with the pointer address. Eg, const char *ptr; here we can not change the value of the address pointed by ptr by using ptr.
const char *ptr
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Using the const keyword we can protect a character pointer by some accidental modification with the pointer address. Eg,
need an explanation for this answer? contact us directly to get an explanation for this answerconst char *ptr; here we can not change the value of the address pointed by ptr by using ptr.