What is the difference between the following two definitions:
char* str = "example";
and
const char* str = "example";
From what I've learnt, in the first definition, the str
is bound to the address location returned by the compiler for the constant literal. And similar is the treatment for the second definition.