Hi.I have some confusion regarding a constant string and constant pointer to a string.
char *str="hello";
Here I think "hello" is constant so we cant modify it.Then what about
const char *str="hello" and
char *const str="hello"?
Please explain it with examples.thanks .
Jerico
char *str="hello";
Here I think "hello" is constant so we cant modify it.Then what about
const char *str="hello" and
char *const str="hello"?
Please explain it with examples.thanks .
Jerico
Comment