16
I know that for example "hello" is of type const char*. So my questions are:
How can we assign a literal string like
"hello"to a non-const char*like this:char* s = "hello"; // "hello" is type of const char* and s is char* // and we know that conversion from const char* to // char* is invalidIs a literal string like
"hello", which will take memory in all my program, or it's just like temporary variable that will get destroyed when the statement ends?