You shouldn't do that. str will point to somewhere in memory that is read-only which is dangerous. You should do this:
1 2 3 4 5 6 7 8
char str[] = "hello";
// or if you are going to use a pointer
char *str = newchar[strlen("hello") + 1];
strcpy(str, "hello");
// and before your program ends...
delete[] str;