would like to know in the following code if "myvalue" is allocated on the stack ?
"myvalue" is a text constant. It's allocated in a read-only area of your executable image. It exists for the duration of your program execution.
var[0] will be valid while var is not deleted ?
Yes.
Should I do ? What is the difference ?
Second example takes more memory. You now have two instances of "myvalue" in memory. One in the text area and one on the heap. You will need to free var[0] when deleting var, or you will have a memory leak.
Forget about trying to dynamically allocate char arrays and use the std::string container.