No, you should not. “Hello world” is a constant string literal, you need to allocate memory using malloc() in C, or new in C++ if you want memory you are free to modify.
Related Posts:
- How to deal with bad_alloc in C++?
- malloc for struct and pointer in C
- What does ‘corrupted double-linked list’ mean
- delete vs delete[] operators in C++
- Calculating Page Table Size
- Is “delete this” allowed in C++?
- What and where are the stack and heap?
- What are the -Xms and -Xmx parameters when starting JVM?
- What does pss mean in /proc/pid/smaps
- What is the array form of ‘delete’?
- How can I explicitly free memory in Python?
- Is there a way to delete created variables, functions, etc from the memory of the interpreter?
- Exception Error c0000005 in VC++
- Which Python memory profiler is recommended? [closed]
- Oracle startup not possible – ORA-00845: MEMORY_TARGET not supported on this system – but memory size seems to be fine
- Deleting a dynamically allocated 2D array
- Thread 1: EXC_BAD_ACCESS (code=1, address=0x0) standard C memory issue
- How do malloc() and free() work?
- Deleting an object in C++
- C++: Access violation writing location
- What are the differences between virtual memory and physical memory?
- Conflict Miss v/s Compulsory Miss
- Valgrind complains with “Invalid write of size 8”
- How to delete object?
- How do I determine the size of an object in Python?
- What does this GCC error “… relocation truncated to fit…” mean?
- malloc(): memory corruption
- C: pointer to array of pointers to structures (allocation/deallocation issues)
- Why is this vector iterator not incrementable?
- Should I set a MaxMetaspaceSize?
- Dynamic vs static array in c
- Releasing memory in Python
- calculate the effective access time
- Different ways to deallocate an array – c++
- How to force JavaScript to deep copy a string?
- How can I create a dynamically sized array of structs?